From 25a952ada3a6a485272f03437dabe77ecdc5e818 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Fri, 27 Oct 2023 12:01:33 -0700 Subject: [PATCH] initial commits --- symbols/rune/lowercase_test.go | 95 ++++++++++++++++++++++++++++++++++ symbols/rune/symbols_test.go | 88 ------------------------------- 2 files changed, 95 insertions(+), 88 deletions(-) create mode 100644 symbols/rune/lowercase_test.go diff --git a/symbols/rune/lowercase_test.go b/symbols/rune/lowercase_test.go new file mode 100644 index 0000000..d660416 --- /dev/null +++ b/symbols/rune/lowercase_test.go @@ -0,0 +1,95 @@ +package runesymbols_test + +import ( + "testing" + + "sourcecode.social/reiver/go-hexadeca/symbols/rune" +) + +func TestLowerCase(t *testing.T) { + + tests := []struct{ + Value byte + Expected rune + }{ + { + Value: 0, + Expected: '0', + }, + { + Value: 1, + Expected: '1', + }, + { + Value: 2, + Expected: '2', + }, + { + Value: 3, + Expected: '3', + }, + { + Value: 4, + Expected: '4', + }, + { + Value: 5, + Expected: '5', + }, + { + Value: 6, + Expected: '6', + }, + { + Value: 7, + Expected: '7', + }, + { + Value: 8, + Expected: '8', + }, + { + Value: 9, + Expected: '9', + }, + { + Value: 10, + Expected: 'a', + }, + { + Value: 11, + Expected: 'b', + }, + { + Value: 12, + Expected: 'c', + }, + { + Value: 13, + Expected: 'd', + }, + { + Value: 14, + Expected: 'e', + }, + { + Value: 15, + Expected: 'f', + }, + } + + for testNumber, test := range tests { + + actual := runesymbols.LowerCase(test.Value) + expected := test.Expected + + if expected != actual { + t.Errorf("For test #%d, the actual value is not what was expected.", testNumber) + t.Logf("EXPECTED: %q (%d)", expected, expected) + t.Logf("ACTUAL: %q (%d)", actual, actual) + t.Logf("VALUE: %x (%d)", test.Value, test.Value) + continue + } + + } +} diff --git a/symbols/rune/symbols_test.go b/symbols/rune/symbols_test.go index 4a5d279..deb0149 100644 --- a/symbols/rune/symbols_test.go +++ b/symbols/rune/symbols_test.go @@ -6,94 +6,6 @@ import ( "sourcecode.social/reiver/go-hexadeca/symbols/rune" ) -func TestLowerCase(t *testing.T) { - - tests := []struct{ - Value byte - Expected rune - }{ - { - Value: 0, - Expected: '0', - }, - { - Value: 1, - Expected: '1', - }, - { - Value: 2, - Expected: '2', - }, - { - Value: 3, - Expected: '3', - }, - { - Value: 4, - Expected: '4', - }, - { - Value: 5, - Expected: '5', - }, - { - Value: 6, - Expected: '6', - }, - { - Value: 7, - Expected: '7', - }, - { - Value: 8, - Expected: '8', - }, - { - Value: 9, - Expected: '9', - }, - { - Value: 10, - Expected: 'a', - }, - { - Value: 11, - Expected: 'b', - }, - { - Value: 12, - Expected: 'c', - }, - { - Value: 13, - Expected: 'd', - }, - { - Value: 14, - Expected: 'e', - }, - { - Value: 15, - Expected: 'f', - }, - } - - for testNumber, test := range tests { - - actual := runesymbols.LowerCase(test.Value) - expected := test.Expected - - if expected != actual { - t.Errorf("For test #%d, the actual value is not what was expected.", testNumber) - t.Logf("EXPECTED: %q (%d)", expected, expected) - t.Logf("ACTUAL: %q (%d)", actual, actual) - t.Logf("VALUE: %x (%d)", test.Value, test.Value) - continue - } - - } -} - func TestPersian(t *testing.T) { tests := []struct{