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
a8abbdfdcc
Remove scons build files
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:08 -04:00
Anna Schumaker
19ca9d932b
tests: Build gui audio test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
59839547e2
tests: Build gui playlist test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
dd268a24fe
tests: Build sidebar test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
0470c6efa6
tests: Build gui idle test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
4e9c5e0a00
tests: Build window test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
6a1c27e9a4
tests: Build gui queue test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
b2dbbbaae6
tests: Build treeview test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
c671c7aefc
tests: Build model test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
3e2ed7761c
tests: Build settings test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
1710c8076a
tests: Build gtk builder test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
8f8e4a4459
tests: Build audio test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
926ca09275
tests: Build tempq test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
7e09375325
tests: Remove core/playlist.c test
...
The playlist code is heavily tested by unit tests for the files in
core/playlists/, so we no longer need to have a separate playlist test.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
9b7c45634c
tests: Build core/playlists/library test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
487274ff00
tests: Build core/playlists/artist test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
c67d09740c
tests: Build core/playlists/system test with ctest
...
I initially tried making several helper functions to reuse code and make
it easier to add new playlists. This didn't work all that well, mostly
because glib wasn't able to expand variable values or find the line
number that errors occured on. Macros don't have this problem, since
they are expanded at compile time.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
f9dd51170d
tests: Build queue test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
8327d77ddd
tests: Build tags/track test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
5e65414263
build: Generate albums through cmake
...
This is much more straightforward than having scons call a bash script.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
921a04e28e
tests: Build tags/library test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
ca2f35a848
tests: Build tags/genre test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
3b03301e61
tests: Allow disabling the Album Art Fetching test
...
This test can take a long time to run, especially on slow internet
connections. Let's add a way to disable it when testing other things.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-23 16:11:02 -04:00
Anna Schumaker
65bbd21669
tests: Build tags/album test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
8c875acec9
tests: Build tags/artist test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
1b83978b09
tests: Build containers/database test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
10f81461d9
tests: Build idle test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
4fb854d0b1
tests: Build date test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
fc88f68d6b
tests: Build file test with ctest
...
This changes test output slightly, in that files are now placed under
subdirectories of $XDG_USER_DATA_DIR/ocarina-test/ instead of in this
directory directly. This should help avoid conflicting files, and lets
me use a single "rm" command to remove everything before testing.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -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
2f559b2fb3
tests: Build version test with CTest
...
This begins the conversion to CTest and the GLib unit test framework.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
1bc43a9e2c
gui/queue: Remove unused fields from struct gui_queue
...
Now that we have a single model and filter there is no need to attach
them to every gui_queue.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
336c0a01af
gui/queue: Only allocate a single GtkTreeModelFilter
...
The view is now responsible for allocating the filter, but the gui_queue
still needs to set the filter function during an init step.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
65b43c7ae5
gui/model: Make sure that the queue model can represent a NULL queue
...
Otherwise this could lead to crashes or buggy behavior.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
40bce8cc59
gui/model: Don't require a GuiQueueModel for public functions
...
We can get by without this now that the model is shared across all
queues.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
5c426fc8d7
gui/model: Update runtime label when the model changes
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
f58cc8da46
gui/model: Add a function for getting the current queue
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
a28b5c4ec5
gui/model: Create a static, shared GuiQueueModel
...
Now that we can switch between different queues we no longer need to
allocate multiple models.
Implements #72 : Only allocate a single GuiQueueModel for all playlists
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:29 -04:00
Anna Schumaker
a9aa3c297d
gui/model: Add support for changing the represented queue
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:52:27 -04:00
Anna Schumaker
c2178bc265
core: Cut back on hardcoded dbe_index uses
...
The dbe_index of a given database item might change in the future, so we
can't rely on it everywhere. Let's just use it for saving and loading
files, with the expectation that changes will happen sometime after
startup.
Implements #69 : Reduce use of dbe_index in Ocarina code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:50:45 -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
65b547f60b
core/tags/album: Add pointer to genre tag
...
Albums tend to have a single genre for all tracks, so it makes more
sense for an album to point to genre information.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-11 10:25:43 -04:00
Anna Schumaker
15807434a4
gui/view: Unit test cleanups
...
- Define __queue_filter_how_changed() for tests that need queue
callback functions
- Increase column sizes in the view test to make test more reliable
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-08-29 07:59:11 -04:00
Anna Schumaker
11ef52b5de
core/string: Remove unused string functions
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker
aead4939c3
core/filter: Remove filter.c
...
It is unused now that I have a token matching system in place.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker
d16e06111d
core/tags/track: Add track_match_token() function
...
This is used to check if a track has a token that begins with the
requested string.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker
6ad4325f22
core/tags/track: Convert lowercased string into tokens
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker
2e1c27294b
core/tags/genre: Add genre_match_token() function
...
This is called to check if any string in a genre's token list is
prefixed by the given string.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00
Anna Schumaker
1ca9bb36c1
core/tags/genre: Convert lowercased string into tokens
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-29 07:33:00 -04:00