MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / TestIsBalancedHandlesOneChar

Function TestIsBalancedHandlesOneChar

other/nested/nestedbrackets_test.go:40–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestIsBalancedHandlesOneChar(t *testing.T) {
41 input := "{"
42
43 got := IsBalanced(input)
44 want := false
45
46 if got != want {
47 t.Errorf("\nInput: %s\nGot: %v\nWant: %v\n", input, got, want)
48 }
49}
50
51func TestIsBalancedHandlesNonBracketsCorrectly(t *testing.T) {
52 input := "aaaa"

Callers

nothing calls this directly

Calls 1

IsBalancedFunction · 0.85

Tested by

no test coverage detected