MCPcopy Index your code
hub / github.com/buger/jsonparser / TestParseBoolean

Function TestParseBoolean

parser_test.go:2196–2206  ·  view source on GitHub ↗

Verifies: SYS-REQ-036 [example] MCDC SYS-REQ-036: raw_boolean_literal_is_valid=F, returns_parseboolean_error=T => TRUE Verifies: SYS-REQ-012 [example] MCDC SYS-REQ-012: raw_boolean_literal_is_valid=F, returns_parseboolean_value=F => TRUE MCDC SYS-REQ-012: raw_boolean_literal_is_valid=T, returns_pars

(t *testing.T)

Source from the content-addressed store, hash-verified

2194// MCDC SYS-REQ-012: raw_boolean_literal_is_valid=T, returns_parseboolean_value=F => FALSE
2195// MCDC SYS-REQ-012: raw_boolean_literal_is_valid=T, returns_parseboolean_value=T => TRUE
2196func TestParseBoolean(t *testing.T) {
2197 runParseTests(t, "ParseBoolean()", parseBoolTests,
2198 func(test ParseTest) (value interface{}, err error) {
2199 return ParseBoolean([]byte(test.in))
2200 },
2201 func(test ParseTest, obtained interface{}) (bool, interface{}) {
2202 expected := test.out.(bool)
2203 return obtained.(bool) == expected, expected
2204 },
2205 )
2206}
2207
2208// Verifies: SYS-REQ-037 [example]
2209// MCDC SYS-REQ-037: raw_float_token_is_well_formed=F, returns_parsefloat_error=T => TRUE

Callers

nothing calls this directly

Calls 2

runParseTestsFunction · 0.85
ParseBooleanFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…