@@ -803,6 +803,36 @@ TEST(Compiler_output_simple, annotations_success_9) {
803803 0 , sourcemeta::core::JSON{true });
804804}
805805
806+ TEST (Compiler_output_simple, annotations_success_10) {
807+ const sourcemeta::core::JSON schema{sourcemeta::core::parse_json (R"JSON( {
808+ "$schema": "https://json-schema.org/draft/2020-12/schema",
809+ "contains": { "type": "number", "title": "Test" }
810+ })JSON" )};
811+
812+ const auto schema_template{sourcemeta::blaze::compile (
813+ schema, sourcemeta::core::schema_official_walker,
814+ sourcemeta::core::schema_official_resolver,
815+ sourcemeta::blaze::default_schema_compiler,
816+ sourcemeta::blaze::Mode::Exhaustive)};
817+
818+ const sourcemeta::core::JSON instance{
819+ sourcemeta::core::parse_json (" [ \" foo\" , 42, true ]" )};
820+
821+ sourcemeta::blaze::SimpleOutput output{instance};
822+ sourcemeta::blaze::Evaluator evaluator;
823+ const auto result{
824+ evaluator.validate (schema_template, instance, std::ref (output))};
825+ EXPECT_TRUE (result);
826+
827+ EXPECT_ANNOTATION_COUNT (output, 2 );
828+
829+ EXPECT_ANNOTATION_ENTRY (output, " " , " /contains" , " #/contains" , 1 );
830+ EXPECT_ANNOTATION_ENTRY (output, " /1" , " /contains/title" , " #/contains/title" ,
831+ 1 );
832+ EXPECT_ANNOTATION_VALUE (output, " /1" , " /contains/title" , " #/contains/title" ,
833+ 0 , sourcemeta::core::JSON{" Test" });
834+ }
835+
806836TEST (Compiler_output_simple, annotations_failure_1) {
807837 const sourcemeta::core::JSON schema{sourcemeta::core::parse_json (R"JSON( {
808838 "$schema": "https://json-schema.org/draft/2020-12/schema",
0 commit comments