Commit graph

41 commits

Author SHA1 Message Date
Shaun Ruffell
22dc0efa70 test: Add test to ensure Datafile throws when deleteInterval fails
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Shaun Ruffell
c75d9fefad test: Remove unused variables from DatetimeParser.t
Quiets the following warnings when building the test:

  test/DatetimeParser.t.cpp: In function ‘int main(int, char**)’:
  test/DatetimeParser.t.cpp:163:7: warning: unused variable ‘hm’ [-Wunused-variable]
     int hm  = (12 * 3600) + (34 * 60);      // The time 12:34:00 in seconds.
         ^~
  test/DatetimeParser.t.cpp:164:7: warning: unused variable ‘z’ [-Wunused-variable]
     int z   = 3600;                         // TZ offset.
         ^
  test/DatetimeParser.t.cpp:317:7: warning: unused variable ‘t8a’ [-Wunused-variable]
     int t8a   = (8 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:318:7: warning: unused variable ‘t830a’ [-Wunused-variable]
     int t830a = (8 * 3600) + (30 * 60);
         ^~~~~
  test/DatetimeParser.t.cpp:319:7: warning: unused variable ‘t8p’ [-Wunused-variable]
     int t8p   = (20 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:320:7: warning: unused variable ‘t830p’ [-Wunused-variable]
     int t830p = (20 * 3600) + (30 * 60);
         ^~~~~
  test/DatetimeParser.t.cpp:321:7: warning: unused variable ‘t12p’ [-Wunused-variable]
     int t12p  = (12 * 3600);
         ^~~~
  test/DatetimeParser.t.cpp:322:7: warning: unused variable ‘t1p’ [-Wunused-variable]
     int t1p   = (13 * 3600);
         ^~~
  test/DatetimeParser.t.cpp:325:7: warning: variable ‘adjust’ set but not used [-Wunused-but-set-variable]
     int adjust = (time_now.hour () > 10 || (time_now.hour () == 10 && time_now.minute () > 30)) ? 86400 : 0;
         ^~~~~~

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-11 10:39:34 +02:00
Thomas Lauf
368d033ce5 Rename atomic to AtomicFileTest
- Avoid possible clash with lib atomic on macOS, e.g. in /Library/Developer/CommandLineTools/usr/include/c++/v1/memory:668

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-03-02 21:42:53 +01:00
Shaun Ruffell
8e99c07d85 Introduce AtomicFiles
Introduce AtomicFile and a test of this module to the code.

AtomicFile is like File, except all writes go to temporary files until
the class method finalize_all () is called and the temporary files are
copied over the real files. If any writes fail, like when there is no
more space on the filesystem, none of the files in the database will be
modified.

Since we need version 1.00 of libfiu, I have only added it to the debian
testing container, which includes libfiu-1.00 in the default repository.

Related to #155
2020-02-23 19:03:40 +01:00
Thomas Lauf
daec6b1fae Clean up .gitignore files
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-04-10 12:08:42 +02:00
Thomas Lauf
2e7ed5076a Add TagInfoDatabase.t to .gitignore 2018-12-07 14:02:03 +01:00
Paul Beckingham
6ade46085e Tests: Removed unnecessary platform.t 2017-04-08 13:41:25 -04:00
Paul Beckingham
26f2cc8ac4 Test: Added platform verification tests 2017-03-02 08:41:30 -05:00
Paul Beckingham
ca57bf91e3 Build: Migrated Lexer to libshared 2016-06-25 10:11:08 -04:00
Paul Beckingham
b5cf680730 Tests: Removed palette tests, which are now part of libshared 2016-04-30 21:00:39 -04:00
Paul Beckingham
627cda219e Tests: Broke up helper/data tests 2016-04-28 20:59:28 -04:00
Paul Beckingham
8f69e6f0ec Composite: Now relying on libshared version 2016-04-25 16:23:33 -04:00
Paul Beckingham
8113a4f24d Tests: Added quantizeTo15Minutes 2016-04-24 09:38:47 -04:00
Paul Beckingham
4176bf23d4 Range: Renamed Daterange to Range 2016-04-23 08:52:16 -04:00
Paul Beckingham
a73a95d7a1 Tests: Added Palette check 2016-04-22 23:41:54 -04:00
Paul Beckingham
ad8ed0466c Tests: Added Daterange 2016-04-16 08:52:11 -04:00
Paul Beckingham
6ca48808a8 Cleanup: Removed calls superceded by CLI 2016-04-03 17:46:49 -04:00
Paul Beckingham
68ba48e85f Cleanup: Removed unused files 2016-04-03 13:02:52 -04:00
Paul Beckingham
69483202fc Tests: Added composite tests 2016-03-29 22:48:59 -04:00
Paul Beckingham
2d0475f350 Tests: Added Exclusion tests 2016-03-27 23:51:54 -04:00
Paul Beckingham
ea5a5b743c Tests: Added getKeywords 2016-03-26 14:08:35 -04:00
Paul Beckingham
f50b3b4fc2 Tests: Added ::escape 2016-03-20 14:14:42 -04:00
Paul Beckingham
a33e5f01c5 Tests: Added Interval 2016-03-20 13:08:15 -04:00
Paul Beckingham
b6ad3c741c JSON: Migrated to Common 2016-03-01 01:38:13 -05:00
Paul Beckingham
07190f4f65 Tests: Added json_test, a test rig for parsing external JSON files 2016-03-01 00:12:18 -05:00
Paul Beckingham
4ea233f103 Tests: Added test binary 2016-03-01 00:11:15 -05:00
Paul Beckingham
5690fb784a Pig: Promoted Pig to common.git 2016-01-19 01:10:41 -05:00
Paul Beckingham
bea3586638 Tests: Removed common tests 2016-01-18 23:09:59 -05:00
Paul Beckingham
f4b3f5ea87 Tests: Added unicode tests 2016-01-14 17:26:34 -05:00
Paul Beckingham
6d53cb7c95 Tests: Added Table tests 2016-01-05 16:57:07 -05:00
Paul Beckingham
26693a50b5 Tests: Added framework for Pig tests 2015-12-29 13:13:03 -05:00
Paul Beckingham
925e8ec14b Tests: Added LR0 test framework 2015-12-23 09:23:57 -05:00
Paul Beckingham
dcc1a3c451 Tests: Added rules test framework 2015-12-23 09:23:11 -05:00
Paul Beckingham
eb6932c81a Tests: Added Grammar test 2015-12-22 09:40:50 -05:00
Paul Beckingham
f637a10078 Common: Added liѕtDiff template function 2015-12-22 08:45:40 -05:00
Paul Beckingham
d4420f1b22 Common: Added FS + tests 2015-12-20 15:39:44 -05:00
Paul Beckingham
a97f819423 Tests: Added Lexer tests 2015-12-20 12:50:41 -05:00
Paul Beckingham
2c181ec07e Test: Added tests for common/text.cpp 2015-12-20 11:21:33 -05:00
Paul Beckingham
648517f608 Test: Added rx.t 2015-12-20 10:51:30 -05:00
Paul Beckingham
735b0ce793 Tests: Added color tests 2015-12-18 22:43:36 -05:00
Paul Beckingham
2235b8e407 Framework: Added basic test framework 2015-12-10 09:56:43 -05:00