MCPcopy Create free account
hub / github.com/apple/coremltools / testStateFeatureIsNotFP16_shouldFail

Function testStateFeatureIsNotFP16_shouldFail

mlmodel/tests/InterfaceTests.cpp:427–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427int testStateFeatureIsNotFP16_shouldFail() {
428 Specification::Model m;
429 auto *description = m.mutable_description();
430 auto *state = description->add_state();
431
432 setupStateFeature(state, "x");
433 state->mutable_type()->mutable_statetype()->mutable_arraytype()->set_datatype(::CoreML::Specification::ArrayFeatureType_ArrayDataType_FLOAT32);
434
435 // Check model specification version requirements.
436 auto validationPolicy = validationPolicyForStateTests();
437 ML_ASSERT_BAD_WITH_TYPE(validateModelDescription(*description, MLMODEL_SPECIFICATION_VERSION_NEWEST, validationPolicy), ResultType::INVALID_MODEL_INTERFACE);
438
439 return 0;
440}
441
442int testStateFeatureIsOptional_shouldFail() {
443 Specification::Model m;

Callers

nothing calls this directly

Calls 3

setupStateFeatureFunction · 0.85
validateModelDescriptionFunction · 0.85

Tested by

no test coverage detected