Commit Graph

14 Commits

Author SHA1 Message Date
Anna Schumaker 99faa0cf39 tests: g_assert_cmpstr_free() stores the lhs in a temporary variable
Valgrind told me that all calls to g_assert_cmpstr_free() weren't
actually freeing the string.  A closer look shows that if we pass a
function as "lhs" then the function will be called twice, allocating
twice as much memory.

Fix this by storing the result of lhs in a temporary variable so
functions are only ever called once.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-28 15:20:24 -04:00
Anna Schumaker 524d1886f9 tests: Remove scons-based testing code
Completes issue #4: Investigate CTest
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:08 -04:00
Anna Schumaker 9f2811a343 tests: Build string test with CTest
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker d222c306e0 core/date: Force struct date into 32bits
Three unsigned integers is overkill for handling dates.

Implements #65: Date structure can be represented with a single 32bit
value
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:50:22 -04:00
Anna Schumaker ff81af24fc gui/model: Add support for gtk_tree_model_get_column_type()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-05-14 07:35:40 -04:00
Anna Schumaker df2d365b80 tests: Remove test_cp_data_dir()
This function is unused now.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker 2586348921 core/audio: Convert file to C
I also convert core/core.c so the audio test can be converted at the
same time.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker 3ecb06bcb6 test: Remove library directory creating functions
Changes to the collections layer mean that I don't need this anymore.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-12 09:47:30 -05:00
Anna Schumaker ab837b1a18 core/idle: Convert file to C
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker 1bef380ba7 core/database: Introduce the dbe_key() database operation
And store the result in the db_entry struct for use later.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker 63769c9c0b Convert unit test framework to C
I commented out most of the file and directory modification code while I
was at it.  I'll re-add these as I convert more files to C.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-10-07 08:19:37 -04:00
Anna Schumaker 6cfd0d5c51 tests: Rework much of the testing library
I move the code into a new cpp file, so it is no longer a header-only
library.  I also take the chance to add a for-each function for testing
iterators.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-13 09:35:26 -05:00
Anna Schumaker 9ea0fd4f29 core: Update include file #ifndef guards
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-21 09:49:07 -04:00
Anna Schumaker c88746d2da tests: Create a core/ directory
I move all of the core tests into the core/ directory to keep them
together.  Gui unit tests will be put in new directories.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-14 11:15:21 -04:00