diff --git a/src/yaml_constr.erl b/src/yaml_constr.erl index 692a4c6..b8c9791 100644 --- a/src/yaml_constr.erl +++ b/src/yaml_constr.erl @@ -123,16 +123,16 @@ node_pres(Node) when is_tuple(Node) -> end. %% ------------------------------------------------------------------- -%% Representation. +%% Construction. %% ------------------------------------------------------------------- -construct(Repr, #yaml_doc_start{}) -> +construct(Constr, #yaml_doc_start{}) -> %% Prepare a document node. Doc = #yaml_doc{}, - Repr1 = Repr#yaml_constr{ + Constr1 = Constr#yaml_constr{ current_doc = [Doc] }, - return_new_fun(Repr1); + return_new_fun(Constr1); construct(_, Token) when is_record(Token, yaml_stream_start) orelse @@ -146,7 +146,7 @@ construct(_, Token) when construct( #yaml_constr{current_doc = Doc, current_node_is_leaf = false, - mods = Mods, tags = Tags} = Repr, + mods = Mods, tags = Tags} = Constr, Token) when Doc /= undefined andalso (is_record(Token, yaml_collection_start) orelse is_record(Token, yaml_scalar)) -> @@ -160,12 +160,12 @@ construct( #yaml_tag{uri = {non_specific, _}} -> %% The node has a non-specific tag. We let each module %% decides if they want to construct the node. - try_construct(Repr, Mods, Token); + try_construct(Constr, Mods, Token); #yaml_tag{uri = URI} -> %% We look up this URI in the tag's index. case proplists:get_value(URI, Tags) of Mod when Mod /= undefined -> - Mod:construct_token(Repr, undefined, Token); + Mod:construct_token(Constr, undefined, Token); undefined -> %% This tag isn't handled by anything! Error = #yaml_parsing_error{ @@ -179,20 +179,20 @@ construct( yaml_errors:throw(Error1) end end, - handle_construct_return(Repr, Doc, Ret); + handle_construct_return(Constr, Doc, Ret); construct( #yaml_constr{current_doc = - [#unfinished_node{module = Mod} = Node | Doc]} = Repr, + [#unfinished_node{module = Mod} = Node | Doc]} = Constr, Token) -> %% This token continues a node. We call the current node's module to %% handle it. - Ret = Mod:construct_token(Repr, Node, Token), - handle_construct_return(Repr, Doc, Ret). + Ret = Mod:construct_token(Constr, Node, Token), + handle_construct_return(Constr, Doc, Ret). -try_construct(Repr, [Mod | Rest], Token) -> - case Mod:try_construct_token(Repr, undefined, Token) of - unrecognized -> try_construct(Repr, Rest, Token); +try_construct(Constr, [Mod | Rest], Token) -> + case Mod:try_construct_token(Constr, undefined, Token) of + unrecognized -> try_construct(Constr, Rest, Token); Ret -> Ret end; try_construct(_, [], Token) -> @@ -205,46 +205,46 @@ try_construct(_, [], Token) -> }, yaml_errors:throw(Error). -construct_parent(#yaml_constr{docs = Docs, docs_count = Count} = Repr, +construct_parent(#yaml_constr{docs = Docs, docs_count = Count} = Constr, [#yaml_doc{} = Doc], Root) -> %% This node is the root of the document. Doc1 = Doc#yaml_doc{ root = Root }, - Repr1 = Repr#yaml_constr{ + Constr1 = Constr#yaml_constr{ docs = Docs ++ [Doc1], docs_count = Count + 1, current_doc = undefined, current_node_is_leaf = false, anchors = dict:new() }, - return_new_fun(Repr1); -construct_parent(Repr, [#unfinished_node{module = Mod} = Node | Doc], Child) -> + return_new_fun(Constr1); +construct_parent(Constr, [#unfinished_node{module = Mod} = Node | Doc], Child) -> %% We call the parent node's module to handle this new child node. - Ret = Mod:construct_node(Repr, Node, Child), - handle_construct_return(Repr, Doc, Ret). + Ret = Mod:construct_node(Constr, Node, Child), + handle_construct_return(Constr, Doc, Ret). -handle_construct_return(Repr, Doc, {finished, Node}) -> +handle_construct_return(Constr, Doc, {finished, Node}) -> %% Give this node to the parent node. - construct_parent(Repr, Doc, Node); -handle_construct_return(Repr, Doc, {unfinished, Node, Is_Leaf}) -> + construct_parent(Constr, Doc, Node); +handle_construct_return(Constr, Doc, {unfinished, Node, Is_Leaf}) -> %% Unfinished node, wait for the next tokens. - Repr1 = Repr#yaml_constr{ + Constr1 = Constr#yaml_constr{ current_doc = [Node | Doc], current_node_is_leaf = Is_Leaf }, - return_new_fun(Repr1). + return_new_fun(Constr1). -return_new_fun(#yaml_constr{simple_structs = Simple} = Repr) -> +return_new_fun(#yaml_constr{simple_structs = Simple} = Constr) -> Fun = fun (get_docs) when Simple -> - [Doc#yaml_doc.root || Doc <- Repr#yaml_constr.docs]; + [Doc#yaml_doc.root || Doc <- Constr#yaml_constr.docs]; (get_docs) -> - Repr#yaml_constr.docs; + Constr#yaml_constr.docs; (get_constr) -> - Repr; + Constr; (T) -> - construct(Repr, T) + construct(Constr, T) end, {ok, Fun}. @@ -252,23 +252,24 @@ return_new_fun(#yaml_constr{simple_structs = Simple} = Repr) -> %% Node modules. %% ------------------------------------------------------------------- -setup_node_mods(Repr) -> +setup_node_mods(Constr) -> Mods1 = umerge_unsorted( - proplists:get_value(node_mods, Repr#yaml_constr.options, []), + proplists:get_value(node_mods, Constr#yaml_constr.options, []), yaml_app:get_param(node_mods) ), - Mods = case proplists:get_value(schema, Repr#yaml_constr.options, core) of + Schema = proplists:get_value(schema, Constr#yaml_constr.options, core), + Mods = case Schema of failsafe -> umerge_unsorted(Mods1, ?FAILSAFE_SCHEMA_MODS); json -> umerge_unsorted(Mods1, ?JSON_SCHEMA_MODS); core -> umerge_unsorted(Mods1, ?CORE_SCHEMA_MODS) end, - Auto = filter_autodetection_capable_mods(Mods, []), - Tags = index_tags(Mods, []), - Repr1 = Repr#yaml_constr{ + Auto = filter_autodetection_capable_mods(Mods, []), + Tags = index_tags(Mods, []), + Constr1 = Constr#yaml_constr{ mods = Auto, tags = Tags }, - return_new_fun(Repr1). + return_new_fun(Constr1). umerge_unsorted(List1, List2) -> Fun = fun(Mod, List) -> @@ -313,12 +314,12 @@ index_tags2(Tags, [], _) -> %% ------------------------------------------------------------------- initialize(Options) -> - {Repr_Options, Parser_Options} = filter_options(Options), - Repr = #yaml_constr{ - options = Repr_Options, - simple_structs = proplists:get_value(simple_structs, Repr_Options, true) + {Constr_Options, Parser_Options} = filter_options(Options), + Constr = #yaml_constr{ + options = Constr_Options, + simple_structs = proplists:get_value(simple_structs, Constr_Options, true) }, - {ok, Token_Fun} = setup_node_mods(Repr), + {ok, Token_Fun} = setup_node_mods(Constr), [{token_fun, Token_Fun} | Parser_Options]. filter_options(Options) -> @@ -327,8 +328,8 @@ filter_options(Options) -> ({Name, _}) -> not lists:member(Name, Parser_Options); (_) -> true end, - {Repr_Options, _} = Filtered_Opts = lists:partition(Fun, Options), - check_options(Repr_Options), + {Constr_Options, _} = Filtered_Opts = lists:partition(Fun, Options), + check_options(Constr_Options), Filtered_Opts. check_options([Option | Rest]) -> diff --git a/src/yaml_node_bool.erl b/src/yaml_node_bool.erl index 211f915..3e8c5af 100644 --- a/src/yaml_node_bool.erl +++ b/src/yaml_node_bool.erl @@ -26,10 +26,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}, text = Text} = Token) when ?IS_TRUE(Text) orelse ?IS_FALSE(Text) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_ext_bool.erl b/src/yaml_node_ext_bool.erl index d65e9b5..80e01de 100644 --- a/src/yaml_node_ext_bool.erl +++ b/src/yaml_node_ext_bool.erl @@ -32,10 +32,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}, text = Text} = Token) when ?IS_TRUE(Text) orelse ?IS_FALSE(Text) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_ext_float.erl b/src/yaml_node_ext_float.erl index e543003..018abc9 100644 --- a/src/yaml_node_ext_float.erl +++ b/src/yaml_node_ext_float.erl @@ -22,10 +22,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_float} -> unrecognized diff --git a/src/yaml_node_ext_int.erl b/src/yaml_node_ext_int.erl index 67b36e4..a418954 100644 --- a/src/yaml_node_ext_int.erl +++ b/src/yaml_node_ext_int.erl @@ -27,10 +27,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_integer} -> unrecognized diff --git a/src/yaml_node_float.erl b/src/yaml_node_float.erl index 7234ff1..c58ebc1 100644 --- a/src/yaml_node_float.erl +++ b/src/yaml_node_float.erl @@ -22,10 +22,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_float} -> unrecognized diff --git a/src/yaml_node_int.erl b/src/yaml_node_int.erl index 2f40302..e81aea0 100644 --- a/src/yaml_node_int.erl +++ b/src/yaml_node_int.erl @@ -22,10 +22,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_integer} -> unrecognized diff --git a/src/yaml_node_ipaddr.erl b/src/yaml_node_ipaddr.erl index c068253..642df83 100644 --- a/src/yaml_node_ipaddr.erl +++ b/src/yaml_node_ipaddr.erl @@ -23,10 +23,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_ip_address} -> unrecognized diff --git a/src/yaml_node_json_bool.erl b/src/yaml_node_json_bool.erl index 8efd17a..5e04f3a 100644 --- a/src/yaml_node_json_bool.erl +++ b/src/yaml_node_json_bool.erl @@ -26,10 +26,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}, text = Text} = Token) when ?IS_TRUE(Text) orelse ?IS_FALSE(Text) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_json_float.erl b/src/yaml_node_json_float.erl index 1c44cf5..8df945e 100644 --- a/src/yaml_node_json_float.erl +++ b/src/yaml_node_json_float.erl @@ -22,10 +22,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_float} -> unrecognized diff --git a/src/yaml_node_json_int.erl b/src/yaml_node_json_int.erl index 054b365..dc33cfd 100644 --- a/src/yaml_node_json_int.erl +++ b/src/yaml_node_json_int.erl @@ -22,10 +22,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_an_integer} -> unrecognized diff --git a/src/yaml_node_json_null.erl b/src/yaml_node_json_null.erl index 53791ce..3e65bdb 100644 --- a/src/yaml_node_json_null.erl +++ b/src/yaml_node_json_null.erl @@ -20,10 +20,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}, text = "null"} = Token) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_map.erl b/src/yaml_node_map.erl index 2c66b32..f597253 100644 --- a/src/yaml_node_map.erl +++ b/src/yaml_node_map.erl @@ -22,9 +22,9 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_collection_start{kind = mapping} = Token) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_null.erl b/src/yaml_node_null.erl index 0fbbe43..dd9289b 100644 --- a/src/yaml_node_null.erl +++ b/src/yaml_node_null.erl @@ -20,7 +20,7 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}, text = Text} = Token) when Text == "" orelse @@ -28,7 +28,7 @@ try_construct_token(Repr, Node, Text == "Null" orelse Text == "NULL" orelse Text == "~" -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_seq.erl b/src/yaml_node_seq.erl index 3e7a5a6..a5efc7b 100644 --- a/src/yaml_node_seq.erl +++ b/src/yaml_node_seq.erl @@ -22,9 +22,9 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_collection_start{kind = sequence} = Token) -> - construct_token(Repr, Node, Token); + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_size.erl b/src/yaml_node_size.erl index 95b3244..80483c0 100644 --- a/src/yaml_node_size.erl +++ b/src/yaml_node_size.erl @@ -23,10 +23,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_a_size} -> unrecognized diff --git a/src/yaml_node_str.erl b/src/yaml_node_str.erl index a682007..4b5455b 100644 --- a/src/yaml_node_str.erl +++ b/src/yaml_node_str.erl @@ -21,8 +21,8 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, #yaml_scalar{} = Token) -> - construct_token(Repr, Node, Token); +try_construct_token(Constr, Node, #yaml_scalar{} = Token) -> + construct_token(Constr, Node, Token); try_construct_token(_, _, _) -> unrecognized. diff --git a/src/yaml_node_timestamp.erl b/src/yaml_node_timestamp.erl index 3356cc0..1839045 100644 --- a/src/yaml_node_timestamp.erl +++ b/src/yaml_node_timestamp.erl @@ -32,10 +32,10 @@ tags() -> [?TAG]. -try_construct_token(Repr, Node, +try_construct_token(Constr, Node, #yaml_scalar{tag = #yaml_tag{uri = {non_specific, "?"}}} = Token) -> try - construct_token(Repr, Node, Token) + construct_token(Constr, Node, Token) catch _:#yaml_parsing_error{name = not_a_timestamp} -> unrecognized diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 9c7058d..ef025fa 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -3,9 +3,9 @@ TPL_PL = template.pl TPL_ERL = template.erl COVER_TO_HTML = cover_to_html.sh -TPL_FILES = parsing.erl representation.erl +TPL_FILES = parsing.erl construction.erl -ERL_TESTS = parsing representation +ERL_TESTS = parsing construction TESTS = dialyzer $(ERL_TESTS) diff --git a/testsuite/data/representation/bool.data b/testsuite/data/construction/bool.data similarity index 100% rename from testsuite/data/representation/bool.data rename to testsuite/data/construction/bool.data diff --git a/testsuite/data/representation/bool.pattern b/testsuite/data/construction/bool.pattern similarity index 96% rename from testsuite/data/representation/bool.pattern rename to testsuite/data/construction/bool.pattern index 5f824ce..6f98d19 100644 --- a/testsuite/data/representation/bool.pattern +++ b/testsuite/data/construction/bool.pattern @@ -20,7 +20,7 @@ "Not a bool" ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -101,7 +101,7 @@ 23} } ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/empty.data b/testsuite/data/construction/empty.data similarity index 100% rename from testsuite/data/representation/empty.data rename to testsuite/data/construction/empty.data diff --git a/testsuite/data/representation/empty.pattern b/testsuite/data/construction/empty.pattern similarity index 55% rename from testsuite/data/representation/empty.pattern rename to testsuite/data/construction/empty.pattern index f5e439e..edcb698 100644 --- a/testsuite/data/representation/empty.pattern +++ b/testsuite/data/construction/empty.pattern @@ -8,11 +8,11 @@ [ ?_assertMatch( [], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/erlang_atom.data b/testsuite/data/construction/erlang_atom.data similarity index 100% rename from testsuite/data/representation/erlang_atom.data rename to testsuite/data/construction/erlang_atom.data diff --git a/testsuite/data/representation/erlang_atom.pattern b/testsuite/data/construction/erlang_atom.pattern similarity index 85% rename from testsuite/data/representation/erlang_atom.pattern rename to testsuite/data/construction/erlang_atom.pattern index 598dd6d..268d564 100644 --- a/testsuite/data/representation/erlang_atom.pattern +++ b/testsuite/data/construction/erlang_atom.pattern @@ -14,7 +14,7 @@ 'atom requiring quoting!' ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -31,7 +31,7 @@ 'atom requiring quoting!'}], 2}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/erlang_fun.data b/testsuite/data/construction/erlang_fun.data similarity index 100% rename from testsuite/data/representation/erlang_fun.data rename to testsuite/data/construction/erlang_fun.data diff --git a/testsuite/data/representation/erlang_fun.pattern b/testsuite/data/construction/erlang_fun.pattern similarity index 87% rename from testsuite/data/representation/erlang_fun.pattern rename to testsuite/data/construction/erlang_fun.pattern index df7654a..ec47e3e 100644 --- a/testsuite/data/representation/erlang_fun.pattern +++ b/testsuite/data/construction/erlang_fun.pattern @@ -9,7 +9,7 @@ [ {generator, fun() -> - [Erlang_Fun_Simple] = yaml_repr:file("${FILENAME}", + [Erlang_Fun_Simple] = yaml_constr:file("${FILENAME}", [{simple_structs, true}]), ?_assertMatch( "Hello World!", @@ -24,7 +24,7 @@ [{line,1},{column,28}], Erlang_Fun_Normal, "fun() -> \"Hello World!\" end.\n"}} - ] = yaml_repr:file("${FILENAME}", + ] = yaml_constr:file("${FILENAME}", [{simple_structs, false}]), ?_assertMatch( "Hello World!", diff --git a/testsuite/data/representation/int.data b/testsuite/data/construction/int.data similarity index 100% rename from testsuite/data/representation/int.data rename to testsuite/data/construction/int.data diff --git a/testsuite/data/representation/int.pattern b/testsuite/data/construction/int.pattern similarity index 93% rename from testsuite/data/representation/int.pattern rename to testsuite/data/construction/int.pattern index 9fbb938..5167344 100644 --- a/testsuite/data/representation/int.pattern +++ b/testsuite/data/construction/int.pattern @@ -17,7 +17,7 @@ "Not an int" ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -61,7 +61,7 @@ 11} } ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/ipaddr.data b/testsuite/data/construction/ipaddr.data similarity index 100% rename from testsuite/data/representation/ipaddr.data rename to testsuite/data/construction/ipaddr.data diff --git a/testsuite/data/representation/ipaddr.pattern b/testsuite/data/construction/ipaddr.pattern similarity index 93% rename from testsuite/data/representation/ipaddr.pattern rename to testsuite/data/construction/ipaddr.pattern index 76c2820..37117cc 100644 --- a/testsuite/data/representation/ipaddr.pattern +++ b/testsuite/data/construction/ipaddr.pattern @@ -19,7 +19,7 @@ "Not an IP address" ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -59,7 +59,7 @@ "Not an IP address"}], 7}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/map.data b/testsuite/data/construction/map.data similarity index 100% rename from testsuite/data/representation/map.data rename to testsuite/data/construction/map.data diff --git a/testsuite/data/representation/map.pattern b/testsuite/data/construction/map.pattern similarity index 92% rename from testsuite/data/representation/map.pattern rename to testsuite/data/construction/map.pattern index 1e1313c..b5433cc 100644 --- a/testsuite/data/representation/map.pattern +++ b/testsuite/data/construction/map.pattern @@ -13,7 +13,7 @@ {"second", [{"item", 2}]} ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -47,7 +47,7 @@ [{line,2},{column,17}], 2}}]}}]}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/null.data b/testsuite/data/construction/null.data similarity index 100% rename from testsuite/data/representation/null.data rename to testsuite/data/construction/null.data diff --git a/testsuite/data/representation/null.pattern b/testsuite/data/construction/null.pattern similarity index 88% rename from testsuite/data/representation/null.pattern rename to testsuite/data/construction/null.pattern index ede937b..1890411 100644 --- a/testsuite/data/representation/null.pattern +++ b/testsuite/data/construction/null.pattern @@ -10,7 +10,7 @@ [ [null, null, null, null, null, "Not a null"] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -33,7 +33,7 @@ "Not a null"}], 6}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/seq.data b/testsuite/data/construction/seq.data similarity index 100% rename from testsuite/data/representation/seq.data rename to testsuite/data/construction/seq.data diff --git a/testsuite/data/representation/seq.pattern b/testsuite/data/construction/seq.pattern similarity index 90% rename from testsuite/data/representation/seq.pattern rename to testsuite/data/construction/seq.pattern index 867b3b4..1e76e7d 100644 --- a/testsuite/data/representation/seq.pattern +++ b/testsuite/data/construction/seq.pattern @@ -13,7 +13,7 @@ [ "item", 2 ] ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -45,7 +45,7 @@ 2} } ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/size.data b/testsuite/data/construction/size.data similarity index 100% rename from testsuite/data/representation/size.data rename to testsuite/data/construction/size.data diff --git a/testsuite/data/representation/size.pattern b/testsuite/data/construction/size.pattern similarity index 92% rename from testsuite/data/representation/size.pattern rename to testsuite/data/construction/size.pattern index 233160c..2f43d03 100644 --- a/testsuite/data/representation/size.pattern +++ b/testsuite/data/construction/size.pattern @@ -15,7 +15,7 @@ "Not a size" ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -51,7 +51,7 @@ "Not a size"}], 9}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] } diff --git a/testsuite/data/representation/timestamp.data b/testsuite/data/construction/timestamp.data similarity index 100% rename from testsuite/data/representation/timestamp.data rename to testsuite/data/construction/timestamp.data diff --git a/testsuite/data/representation/timestamp.pattern b/testsuite/data/construction/timestamp.pattern similarity index 93% rename from testsuite/data/representation/timestamp.pattern rename to testsuite/data/construction/timestamp.pattern index ee12abf..f3d06f0 100644 --- a/testsuite/data/representation/timestamp.pattern +++ b/testsuite/data/construction/timestamp.pattern @@ -18,7 +18,7 @@ "Not a timestamp" ] ], - yaml_repr:file("${FILENAME}", [{simple_structs, true}]) + yaml_constr:file("${FILENAME}", [{simple_structs, true}]) ), ?_assertMatch( [ @@ -55,7 +55,7 @@ "Not a timestamp"}], 6}} ], - yaml_repr:file("${FILENAME}", [{simple_structs, false}]) + yaml_constr:file("${FILENAME}", [{simple_structs, false}]) ) ] }