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

Function testStateFeatureIsOptional_shouldFail

mlmodel/tests/InterfaceTests.cpp:442–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442int testStateFeatureIsOptional_shouldFail() {
443 Specification::Model m;
444 auto *description = m.mutable_description();
445 auto *state = description->add_state();
446
447 setupStateFeature(state, "x");
448 state->mutable_type()->set_isoptional(true);
449
450 // Check model specification version requirements.
451 auto validationPolicy = validationPolicyForStateTests();
452 ML_ASSERT_BAD_WITH_TYPE(validateModelDescription(*description, MLMODEL_SPECIFICATION_VERSION_NEWEST, validationPolicy), ResultType::INVALID_MODEL_INTERFACE);
453
454 return 0;
455}
456
457int testStateFeatureHasNoDefaultShape_shouldFail() {
458 Specification::Model m;

Callers

nothing calls this directly

Calls 3

setupStateFeatureFunction · 0.85
validateModelDescriptionFunction · 0.85

Tested by

no test coverage detected