142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Test_Render (Test, Default, "", 12, "12");
Test_Render (Test, Default, "(padding 1: )", 7, " 7");
end;
exception
when Error : others => Test.Report_Exception (Error);
end Explicit_Default_Format;
procedure Explicit_Images (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Explicit images in template");
begin
Test_Render (Test, "(image (-2 two) (666 evil))", 10, "10");
Test_Render (Test, "(image (-2 two) (666 evil))", -2, "two");
Test_Render (Test, "(image (-2 two) (666 evil))", 666, "evil");
Test_Render (Test, "(image (-2 two) (666 evil) (-2))", -2, "-2");
Test_Render (Test, "(image (1 one))3:Two4:four", 1, "one");
Test_Render (Test, "(image (1 one))3:Two4:four", 2, "Two");
Test_Render (Test, "(image (1 one))3:Two4:four", 3, "four");
Test_Render (Test, "(image (1 one))3:Two4:four", 4, "4");
Test_Render (Test, "(image (invalid -))5:first", Integer'First, "first");
exception
when Error : others => Test.Report_Exception (Error);
end Explicit_Images;
procedure Explicit_Sign (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Explicit sign specification");
begin
Test_Render (Test, "(sign +)", 42, "+42");
Test_Render (Test, "(sign + _)", 42, "+42");
Test_Render (Test, "(sign + _)", -42, "_42");
|