MCPcopy Create free account
hub / github.com/buger/jsonparser / TestGetBoolean

Function TestGetBoolean

parser_test.go:1602–1613  ·  view source on GitHub ↗

Verifies: SYS-REQ-005 [example] STK-REQ-003:AC-3:acceptance MCDC SYS-REQ-005: addressed_value_is_boolean=F, raw_boolean_token_is_well_formed=T, returns_getboolean_value=F => TRUE MCDC SYS-REQ-005: addressed_value_is_boolean=T, raw_boolean_token_is_well_formed=F, returns_getboolean_value=F => TRUE MC

(t *testing.T)

Source from the content-addressed store, hash-verified

1600// MCDC SYS-REQ-005: addressed_value_is_boolean=T, raw_boolean_token_is_well_formed=T, returns_getboolean_value=F => FALSE
1601// MCDC SYS-REQ-005: addressed_value_is_boolean=T, raw_boolean_token_is_well_formed=T, returns_getboolean_value=T => TRUE
1602func TestGetBoolean(t *testing.T) {
1603 runGetTests(t, "GetBoolean()", getBoolTests,
1604 func(test GetTest) (value interface{}, dataType ValueType, err error) {
1605 value, err = GetBoolean([]byte(test.json), test.path...)
1606 return value, Boolean, err
1607 },
1608 func(test GetTest, value interface{}) (bool, interface{}) {
1609 expected := test.data.(bool)
1610 return expected == value.(bool), expected
1611 },
1612 )
1613}
1614
1615// Verifies: SYS-REQ-001 [example]
1616// MCDC SYS-REQ-001: N/A

Callers

nothing calls this directly

Calls 2

runGetTestsFunction · 0.85
GetBooleanFunction · 0.85

Tested by

no test coverage detected