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

Function TestParseFloat

parser_test.go:2214–2224  ·  view source on GitHub ↗

Verifies: SYS-REQ-037 [example] MCDC SYS-REQ-037: raw_float_token_is_well_formed=F, returns_parsefloat_error=T => TRUE Verifies: SYS-REQ-013 [example] MCDC SYS-REQ-013: raw_float_token_is_well_formed=F, returns_parsefloat_value=F => TRUE MCDC SYS-REQ-013: raw_float_token_is_well_formed=T, returns_pa

(t *testing.T)

Source from the content-addressed store, hash-verified

2212// MCDC SYS-REQ-013: raw_float_token_is_well_formed=T, returns_parsefloat_value=F => FALSE
2213// MCDC SYS-REQ-013: raw_float_token_is_well_formed=T, returns_parsefloat_value=T => TRUE
2214func TestParseFloat(t *testing.T) {
2215 runParseTests(t, "ParseFloat()", parseFloatTest,
2216 func(test ParseTest) (value interface{}, err error) {
2217 return ParseFloat([]byte(test.in))
2218 },
2219 func(test ParseTest, obtained interface{}) (bool, interface{}) {
2220 expected := test.out.(float64)
2221 return obtained.(float64) == expected, expected
2222 },
2223 )
2224}
2225
2226// Verifies: SYS-REQ-013 [fuzz]
2227// MCDC SYS-REQ-013: N/A

Callers

nothing calls this directly

Calls 2

runParseTestsFunction · 0.85
ParseFloatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…