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

Function TestGetBoolean

parser_test.go:1601–1612  ·  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

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