| 398 | } |
| 399 | |
| 400 | int testStateSpecificationVersion() { |
| 401 | Specification::Model m; |
| 402 | auto *description = m.mutable_description(); |
| 403 | setupStateFeature(description->add_state(), "x"); |
| 404 | |
| 405 | // Check model specification version requirements. |
| 406 | auto validationPolicy = validationPolicyForStateTests(); |
| 407 | ML_ASSERT_BAD_WITH_TYPE(validateModelDescription(*description, MLMODEL_SPECIFICATION_VERSION_IOS17, validationPolicy), ResultType::INVALID_COMPATIBILITY_VERSION); |
| 408 | ML_ASSERT_GOOD(validateModelDescription(*description, MLMODEL_SPECIFICATION_VERSION_IOS18, validationPolicy)); |
| 409 | |
| 410 | return 0; |
| 411 | } |
| 412 | |
| 413 | /// For backward compabitility reason, it is OK to declare state features in the input descriptions. |
| 414 | int testStateFeatureDescriptionInInputs() { |
nothing calls this directly
no test coverage detected