@@ 20,6 20,7 @@ with Ahven;
with Input;
with JSON.Parser;
with JSON.Data;
+with Hauki.Charbuf;
with Multi_precision_integers;
package body Parser_Tests is
@@ 42,8 43,10 @@ package body Parser_Tests is
procedure Test_Parse_Number is
S : Input.Unbounded_String_Stream;
H : JSON.Data.JSON_Holder.Holder;
+ CB : Hauki.Charbuf.Char_Buffer;
begin
- Input.Open (S, To_Unbounded_String ("{ " & Qt ("one") & ":1 }"));
+ Hauki.Charbuf.Append (CB, "{ " & Qt ("one") & ":1 }");
+ Input.Open (S, CB);
JSON.Parser.Parse (Source => S, Object => H);
declare
use JSON.Data;
@@ 61,8 64,10 @@ package body Parser_Tests is
procedure Test_Parse_Invalid_Number is
S : Input.Unbounded_String_Stream;
H : JSON.Data.JSON_Holder.Holder;
+ CB : Hauki.Charbuf.Char_Buffer;
begin
- Input.Open (S, To_Unbounded_String ("{ " & Qt ("one") & ":1_1 }"));
+ Hauki.Charbuf.Append (CB, "{ " & Qt ("one") & ":1_1 }");
+ Input.Open (S, CB);
JSON.Parser.Parse (Source => S, Object => H);
Fail ("Parse_Error expected");
exception
@@ 75,7 80,7 @@ package body Parser_Tests is
H : JSON.Data.JSON_Holder.Holder;
begin
Input.Open (S,
- To_Unbounded_String ("{ " & Qt ("one") & ":" & Qt ("str") & " }"));
+ "{ " & Qt ("one") & ":" & Qt ("str") & " }");
JSON.Parser.Parse (Source => S, Object => H);
declare
use JSON.Data;