Commit Graph

62 Commits

Author SHA1 Message Date
TheAssassin
be0a891770 Improve test fixture names 2018-11-15 23:45:42 +01:00
TheAssassin
92a1370b30 Be able to use EXPECT_EQ with DesktopFile objects
GoogleTest internally uses operator==(first, second) instead of
first.operator==(second). By implementing the operators outside the
classes, GoogleTest can be made happy.
2018-11-15 23:36:04 +01:00
TheAssassin
541da1b573 Test (in)equality operators 2018-11-15 23:32:36 +01:00
TheAssassin
f274de8045 Make sure default keys don't overwrite existing ones 2018-11-15 21:24:08 +01:00
TheAssassin
e4bf795211 No need for a string conversion operator
Doesn't make sense here anyway.
2018-11-15 20:44:43 +01:00
TheAssassin
e994eacfa0 Prevent unnecessary log messages in unit tests 2018-11-15 19:08:03 +01:00
TheAssassin
2e1a37ccf5 Fix path to test data 2018-11-15 18:05:08 +01:00
TheAssassin
520ac6de9b Reduce amount of implicit behavior in desktop file parser 2018-11-15 18:03:46 +01:00
TheAssassin
1bcdcab057 Restructure desktop file tests, build single binary 2018-11-15 17:58:02 +01:00
TheAssassin
4af76a92c5 Fix duplicate key detection 2018-11-15 13:41:53 +01:00
TheAssassin
d10e0614a1 Increase build speed of tests 2018-11-15 13:39:17 +01:00
TheAssassin
9707b81931 Fix basic format header checks 2018-11-15 13:14:31 +01:00
TheAssassin
21b12cc6b6 Use EXPECT instead of ASSERT 2018-11-15 13:01:10 +01:00
TheAssassin
b43b04f693 Check for valid and invalid keys (spec/basic format) 2018-11-15 01:29:14 +01:00
TheAssassin
61fb8bebdb Fix execution of desktop file tests 2018-11-15 00:58:56 +01:00
TheAssassin
002ba4a496 Split two checks to make sure they're tested separately
Otherwise, one test case is always uncovered (either the first one
passes and the second one triggers, or the first one triggers and the
second one is never tested).
2018-11-14 11:22:38 +01:00
TheAssassin
244d82fede Test behavior on lines with multiple = characters 2018-11-14 11:19:02 +01:00
TheAssassin
9f8121ebff Check whether invalid lines are recognized 2018-11-14 11:16:35 +01:00
TheAssassin
80adfa8872 Recognize broken section headings, mk. 4 2018-11-14 11:14:24 +01:00
TheAssassin
4a07c8151e Make sure errors are recognized in all sections, not just the first one 2018-11-14 11:10:34 +01:00
TheAssassin
ded20c162d Recognize broken section headings, mk. 3 2018-11-14 10:59:17 +01:00
TheAssassin
bf152a509b Recognize broken section headings, mk. 2 2018-11-14 10:46:48 +01:00
TheAssassin
dc8f446ca4 Recognize broken section headings, mk. 1 2018-11-14 10:41:47 +01:00
TheAssassin
fbc1d78122 Use custom exceptions for error handling 2018-11-14 10:31:41 +01:00
TheAssassin
e069f6cd22 Fix typos 2018-11-10 14:03:23 +01:00
TheAssassin
d6e6cac6e0 Move libraries into directories following package path 2018-11-10 01:43:36 +01:00
TheAssassin
a87fd648e0 Add dedicated test for values with spaces
CC @azubieta
2018-11-09 21:28:40 +01:00
TheAssassin
574a883733 Don't require desktop file's path to exist 2018-11-09 21:28:40 +01:00
TheAssassin
6e525e0a65 Add missing newline 2018-11-09 18:31:27 +01:00
TheAssassin
11bbe4d219 Rewrite DesktopFile using own parser 2018-11-09 16:04:40 +01:00
TheAssassin
0d59a27905 Improve test workflow
Use ASSERT first to make sure teh function that performs the work has
run as intended, then use EXPECT to make sure all checks are run.
2018-11-09 13:41:32 +01:00
TheAssassin
8b4feb5fd5 Add data getter 2018-11-09 03:16:14 +01:00
TheAssassin
3e1d340612 Add DesktopFileWriter 2018-11-09 03:05:20 +01:00
TheAssassin
8a2d57e8d5 Move definition of types into DesktopFile
Types will be shared with future DesktopFileWriter class.
2018-11-09 02:26:09 +01:00
TheAssassin
4bb1ef124b Move into proper namespace 2018-11-09 01:56:05 +01:00
TheAssassin
93c947b56a Check whether keys and values with spaces are parsed properly 2018-11-09 01:48:44 +01:00
TheAssassin
4bf295d4d6 Validate all values in desktop file 2018-11-09 01:45:36 +01:00
TheAssassin
2c40482bc0 Implement subscript operator returning sections 2018-11-09 01:44:02 +01:00
TheAssassin
a647205226 Implement conversion to double 2018-11-09 01:32:18 +01:00
TheAssassin
73832323c8 Implement actual parsing 2018-11-09 01:12:48 +01:00
TheAssassin
169275e023 Fix semantics of isEmpty() 2018-11-09 00:58:09 +01:00
TheAssassin
b4efb2bc56 Increase test coverage 2018-11-09 00:54:32 +01:00
TheAssassin
aa2e8b9105 Allow construction from istream 2018-11-09 00:43:02 +01:00
TheAssassin
75f2511437 Add some convenience function to convert/parse value 2018-11-09 00:08:40 +01:00
TheAssassin
9a4916fe84 Desktop file entry initial commit 2018-11-08 23:08:32 +01:00
TheAssassin
22ecabc51b Desktop file parser initial commit 2018-11-08 22:18:23 +01:00
Alexis Lopez Zubieta
9d78e0786b Ensure that custom AppRun are deployed even if no desktop files are found 2018-11-06 07:48:12 -06:00
Alexis Lopez Zubieta
5055efdc05 Rename linuxdeploy.cpp and linuxdeploy.h to core.cpp and core.h 2018-11-05 18:33:14 -06:00
Alexis Lopez Zubieta
553bb9fcb0 No need to override constructor 2018-11-05 15:41:06 -06:00
Alexis Lopez Zubieta
906dcab283 Fix code style 2018-11-05 15:40:15 -06:00