Overview
Comment: | s_expressions-templates-tests-dates: add a test for the new time zone override command |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0dff00ad3fb90b66099f33e8591e4596 |
User & Date: | nat on 2015-06-25 17:01:29 |
Other Links: | manifest | tags |
Context
2015-08-25
| ||
17:25 | Add explicit `limited` keyword in private type completion, as required by newer versions of GNAT check-in: c8aa6fc9a5 user: nat tags: trunk | |
2015-06-25
| ||
17:01 | s_expressions-templates-tests-dates: add a test for the new time zone override command check-in: 0dff00ad3f user: nat tags: trunk | |
2015-06-24
| ||
18:20 | s_expressions-templates-dates: add a new command to override the time zone check-in: 0bd7339369 user: nat tags: trunk | |
Changes
Modified tests/natools-s_expressions-templates-tests-dates.adb from [095f17d300] to [6dbc93453b].
︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + | ------------------------- -- Complete Test Suite -- ------------------------- procedure All_Tests (Report : in out NT.Reporter'Class) is begin Composite_Components (Report); Forced_Time_Zone (Report); Padded_Components (Report); RFC_3339 (Report); Simple_Components (Report); Static_Hash_Map (Report); end All_Tests; |
︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (Test, "(SSMMHH)(DDMMYYYY)", "01082129012014", Ada.Calendar.Formatting.Time_Of (2014, 1, 29, 21, 8, 1)); exception when Error : others => Test.Report_Exception (Error); end Composite_Components; procedure Forced_Time_Zone (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Time zone set in template"); Moment : constant Ada.Calendar.Time := Ada.Calendar.Formatting.Time_Of (2012, 8, 29, 22, 42, 16, Time_Zone => 0); begin Test_Render (Test, "(in-zone 0 (rfc-3339))", "2012-08-29T22:42:16Z", Moment); Test_Render (Test, "(in-zone CEST (rfc-3339))", "2012-08-30T00:42:16+02:00", Moment); Test_Render (Test, "(in-zone -01:12 (rfc-3339))", "2012-08-29T21:30:16-01:12", Moment); Test_Render (Test, "(in-zone +0130 (rfc-3339))", "2012-08-30T00:12:16+01:30", Moment); Test_Render (Test, "(in-zone -10 (rfc-3339))", "2012-08-29T12:42:16-10:00", Moment); Test_Render (Test, "(in-zone FOO (rfc-3339))", "", Moment); Test_Render (Test, "(in-zone BARST (rfc-3339))", "", Moment); Test_Render (Test, "(in-zone 12345 (rfc-3339))", "", Moment); exception when Error : others => Test.Report_Exception (Error); end Forced_Time_Zone; procedure Padded_Components (Report : in out NT.Reporter'Class) is Test : NT.Test := Report.Item ("Simple time components with padding"); Template : constant String := "(padded-month)(padded-day)(padded-hour)(minute)(padded-second)"; begin Test_Render |
︙ |
Modified tests/natools-s_expressions-templates-tests-dates.ads from [6a7301fba4] to [1343ad6815].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | ------------------------------------------------------------------------------ package Natools.S_Expressions.Templates.Tests.Dates is procedure All_Tests (Report : in out NT.Reporter'Class); procedure Composite_Components (Report : in out NT.Reporter'Class); procedure Forced_Time_Zone (Report : in out NT.Reporter'Class); procedure Padded_Components (Report : in out NT.Reporter'Class); procedure RFC_3339 (Report : in out NT.Reporter'Class); procedure Simple_Components (Report : in out NT.Reporter'Class); procedure Static_Hash_Map (Report : in out NT.Reporter'Class); end Natools.S_Expressions.Templates.Tests.Dates; |