From 43ad1cf164700d73e13c4728a52deeeb81f01254 Mon Sep 17 00:00:00 2001 From: evgeniy-scherbina Date: Thu, 2 May 2024 10:55:01 -0400 Subject: [PATCH] CR's fixes: descriptive test names --- x/evm/types/params_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/x/evm/types/params_test.go b/x/evm/types/params_test.go index 9ba2f692a3..027f90f3a3 100644 --- a/x/evm/types/params_test.go +++ b/x/evm/types/params_test.go @@ -200,31 +200,31 @@ func TestCheckIfEnabledPrecompilesAreRegistered(t *testing.T) { errorMsg string }{ { - name: "test-case #1", + name: "success: all enabled precompiles are registered #1", registeredModules: []precompile_modules.Module{m("0x1"), m("0x2"), m("0x3")}, enabledPrecompiles: []string{a("0x1"), a("0x2"), a("0x3")}, errorMsg: "", }, { - name: "test-case #2", + name: "success: all enabled precompiles are registered #2", registeredModules: []precompile_modules.Module{m("0x1"), m("0x2"), m("0x3")}, enabledPrecompiles: []string{a("0x1"), a("0x3")}, errorMsg: "", }, { - name: "test-case #3", + name: "success: no enabled precompiles", registeredModules: []precompile_modules.Module{m("0x1"), m("0x2"), m("0x3")}, enabledPrecompiles: []string{}, errorMsg: "", }, { - name: "test-case #4", + name: "success: no enabled precompiles and no registered modules", registeredModules: []precompile_modules.Module{}, enabledPrecompiles: []string{}, errorMsg: "", }, { - name: "test-case #5", + name: "failure: precompile is enabled, but not registered", registeredModules: []precompile_modules.Module{m("0x1"), m("0x2"), m("0x3")}, enabledPrecompiles: []string{a("0x4")}, errorMsg: fmt.Sprintf("precompile %v is enabled but not registered", a("0x4")), @@ -258,17 +258,17 @@ func TestCheckIfSortedInBytesRepr(t *testing.T) { sorted bool }{ { - name: "test-case #1", + name: "success: addresses are sorted", addrs: []common.Address{addr1, addr2}, sorted: true, }, { - name: "test-case #2", + name: "failure: addresses are in reverse order", addrs: []common.Address{addr2, addr1}, sorted: false, }, { - name: "test-case #3", + name: "success: addresses are sorted in bytes representation", addrs: []common.Address{mixedCaseAddr, upperCaseAddr}, sorted: true, }, @@ -300,17 +300,17 @@ func TestCheckIfUniqueInBytesRepr(t *testing.T) { unique bool }{ { - name: "test-case #1", + name: "success: addresses are unique", addrs: []common.Address{addr1, addr2}, unique: true, }, { - name: "test-case #2", + name: "failure: addresses are not unique", addrs: []common.Address{addr1, addr1}, unique: false, }, { - name: "test-case #3", + name: "failure: addresses are not unique in bytes representation", addrs: []common.Address{lowerCaseAddr, mixedCaseAddr}, unique: false, },