From cc27aed3910f3c3c67fa5ee7ababeac06e6e48a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20Garc=C3=ADa?= Date: Thu, 29 Dec 2022 13:11:15 -0600 Subject: [PATCH] Improve Strings `equal` tests (#3902) Co-authored-by: Francisco --- test/utils/Strings.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/utils/Strings.test.js b/test/utils/Strings.test.js index 67e414e44..6c4c3423b 100644 --- a/test/utils/Strings.test.js +++ b/test/utils/Strings.test.js @@ -132,10 +132,16 @@ contract('Strings', function (accounts) { expect(await this.strings.methods['equal(string,string)']('aa', 'a')).to.equal(false); }); - it('compares two different strings of different (big) lengths', async function () { + it('compares two different large strings', async function () { const str1 = 'a'.repeat(201); const str2 = 'a'.repeat(200) + 'b'; expect(await this.strings.methods['equal(string,string)'](str1, str2)).to.equal(false); }); + + it('compares two equal large strings', async function () { + const str1 = 'a'.repeat(201); + const str2 = 'a'.repeat(201); + expect(await this.strings.methods['equal(string,string)'](str1, str2)).to.equal(true); + }); }); });