Verifies: SYS-REQ-001 MCDC SYS-REQ-001: N/A
(t *testing.T)
| 32 | // Verifies: SYS-REQ-001 |
| 33 | // MCDC SYS-REQ-001: N/A |
| 34 | func TestEqual(t *testing.T) { |
| 35 | if !equalStr(&[]byte{}, "") { |
| 36 | t.Errorf(`equalStr("", ""): expected true, obtained false`) |
| 37 | return |
| 38 | } |
| 39 | |
| 40 | longstr := strings.Repeat("a", 1000) |
| 41 | for i := 0; i < len(longstr); i++ { |
| 42 | s1, s2 := longstr[:i]+"1", longstr[:i]+"2" |
| 43 | b1 := []byte(s1) |
| 44 | |
| 45 | if !equalStr(&b1, s1) { |
| 46 | t.Errorf(`equalStr("a"*%d + "1", "a"*%d + "1"): expected true, obtained false`, i, i) |
| 47 | break |
| 48 | } |
| 49 | if equalStr(&b1, s2) { |
| 50 | t.Errorf(`equalStr("a"*%d + "1", "a"*%d + "2"): expected false, obtained true`, i, i) |
| 51 | break |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // Verifies: SYS-REQ-001 |
| 57 | // MCDC SYS-REQ-001: N/A |
nothing calls this directly
no test coverage detected
searching dependent graphs…