@@ -767,6 +767,42 @@ TEST(Compiler_output_simple, annotations_success_8) {
767767 0 , sourcemeta::core::JSON{true });
768768}
769769
770+ TEST (Compiler_output_simple, annotations_success_9) {
771+ const sourcemeta::core::JSON schema{sourcemeta::core::parse_json (R"JSON( {
772+ "$schema": "https://json-schema.org/draft/2020-12/schema",
773+ "contains": { "type": "boolean" },
774+ "unevaluatedItems": { "type": "number" }
775+ })JSON" )};
776+
777+ const auto schema_template{sourcemeta::blaze::compile (
778+ schema, sourcemeta::core::schema_official_walker,
779+ sourcemeta::core::schema_official_resolver,
780+ sourcemeta::blaze::default_schema_compiler,
781+ sourcemeta::blaze::Mode::Exhaustive)};
782+
783+ const sourcemeta::core::JSON instance{
784+ sourcemeta::core::parse_json (" [ true, 1, false, 2 ]" )};
785+
786+ sourcemeta::blaze::SimpleOutput output{instance};
787+ sourcemeta::blaze::Evaluator evaluator;
788+ const auto result{
789+ evaluator.validate (schema_template, instance, std::ref (output))};
790+ EXPECT_TRUE (result);
791+
792+ EXPECT_ANNOTATION_COUNT (output, 2 );
793+
794+ EXPECT_ANNOTATION_ENTRY (output, " " , " /contains" , " #/contains" , 2 );
795+ EXPECT_ANNOTATION_VALUE (output, " " , " /contains" , " #/contains" , 0 ,
796+ sourcemeta::core::JSON{0 });
797+ EXPECT_ANNOTATION_VALUE (output, " " , " /contains" , " #/contains" , 1 ,
798+ sourcemeta::core::JSON{2 });
799+
800+ EXPECT_ANNOTATION_ENTRY (output, " " , " /unevaluatedItems" , " #/unevaluatedItems" ,
801+ 1 );
802+ EXPECT_ANNOTATION_VALUE (output, " " , " /unevaluatedItems" , " #/unevaluatedItems" ,
803+ 0 , sourcemeta::core::JSON{true });
804+ }
805+
770806TEST (Compiler_output_simple, annotations_failure_1) {
771807 const sourcemeta::core::JSON schema{sourcemeta::core::parse_json (R"JSON( {
772808 "$schema": "https://json-schema.org/draft/2020-12/schema",
0 commit comments