TestHash verifies that the Hash function produces the correct SHA-1 hash values
(t *testing.T)
| 30 | |
| 31 | // TestHash verifies that the Hash function produces the correct SHA-1 hash values |
| 32 | func TestHash(t *testing.T) { |
| 33 | for _, tt := range tests { |
| 34 | t.Run(tt.input, func(t *testing.T) { |
| 35 | result := Hash([]byte(tt.input)) |
| 36 | resultHex := toHexString(result) |
| 37 | if resultHex != tt.expected { |
| 38 | t.Errorf("SHA-1(%q) = %s; want %s", tt.input, resultHex, tt.expected) |
| 39 | } |
| 40 | }) |
| 41 | } |
| 42 | } |
nothing calls this directly
no test coverage detected