Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMapPrinter (5.51 sec)

  1. src/fmt/fmt_test.go

    		// make sure the match ends here
    		loc += len(a[i])
    		if loc >= len(s) || (s[loc] != ' ' && s[loc] != ']') {
    			t.Errorf("map print: %q not properly terminated in %q", a[i], s)
    		}
    	}
    }
    
    func TestMapPrinter(t *testing.T) {
    	m0 := make(map[int]string)
    	s := Sprint(m0)
    	if s != "map[]" {
    		t.Errorf("empty map printed as %q not %q", s, "map[]")
    	}
    	m1 := map[int]string{1: "one", 2: "two", 3: "three"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 58.6K bytes
    - Viewed (0)
Back to top