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

Function TestIsBalancedSimple

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

Source from the content-addressed store, hash-verified

5)
6
7func TestIsBalancedSimple(t *testing.T) {
8 input := "{[()]}"
9
10 got := IsBalanced(input)
11 want := true
12
13 if got != want {
14 t.Errorf("\nInput: %s\nGot: %v\nWant: %v\n", input, got, want)
15 }
16}
17
18func TestIsBalancedFalty(t *testing.T) {
19 input := "{([()]}"

Callers

nothing calls this directly

Calls 1

IsBalancedFunction · 0.85

Tested by

no test coverage detected