aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-12 09:56:03 +0800
committerGitHub <noreply@github.com>2018-09-12 09:56:03 +0800
commit0e8fda250804b9c46232287a18af05e7ccf5bf72 (patch)
treebf4629c34bb61b99f4c51d632df2da9ced54c8bb /core/utils_test.go
parent292ad73ec08621fa9beef5f028860131fcbf9bd9 (diff)
downloaddexon-consensus-0e8fda250804b9c46232287a18af05e7ccf5bf72.tar.gz
dexon-consensus-0e8fda250804b9c46232287a18af05e7ccf5bf72.tar.zst
dexon-consensus-0e8fda250804b9c46232287a18af05e7ccf5bf72.zip
core: total ordering with chain ID (#100)
Diffstat (limited to 'core/utils_test.go')
-rw-r--r--core/utils_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/utils_test.go b/core/utils_test.go
index 5d55de3..bb1cb65 100644
--- a/core/utils_test.go
+++ b/core/utils_test.go
@@ -10,16 +10,16 @@ type UtilsTestSuite struct {
suite.Suite
}
-func (s *UtilsTestSuite) TestRemoveFromSortedIntSlice() {
+func (s *UtilsTestSuite) TestRemoveFromSortedUint32Slice() {
// Remove something exists.
- xs := []int{1, 2, 3, 4, 5}
+ xs := []uint32{1, 2, 3, 4, 5}
s.Equal(
- removeFromSortedIntSlice(xs, 3),
- []int{1, 2, 4, 5})
+ removeFromSortedUint32Slice(xs, 3),
+ []uint32{1, 2, 4, 5})
// Remove something not exists.
- s.Equal(removeFromSortedIntSlice(xs, 6), xs)
+ s.Equal(removeFromSortedUint32Slice(xs, 6), xs)
// Remove from empty slice, should not panic.
- s.Equal([]int{}, removeFromSortedIntSlice([]int{}, 1))
+ s.Equal([]uint32{}, removeFromSortedUint32Slice([]uint32{}, 1))
}
func TestUtils(t *testing.T) {