Benjamin Otte
2881930e68
tests: Remove unused variables
2011-05-27 16:11:09 +02:00
Benjamin Otte
8c4653c4f2
tests: Make forcing of class registers work without gcc warnings
2011-05-27 16:11:09 +02:00
Matthias Clasen
cf86c7c9bb
Move demos around
...
The pixbuf-demo gets its own subdirectory, the other small
tests move from demos/ to tests/.
2011-05-26 00:32:31 -04:00
Benjamin Otte
a21042c156
tests: Add simple CSS test for widget style properties
2011-05-23 15:56:09 +02:00
Benjamin Otte
0c7e5a51f3
reftests: sort EXTRA_DIST in Makefile
2011-05-22 05:56:12 +02:00
Benjamin Otte
4d92835997
reftests: Add a reftest to check shorthands do work
...
Checks shorthands are properly unpacked in the CSS and that they indeed
set all relevant properties. Or at least border-width does.
2011-05-22 05:56:12 +02:00
Benjamin Otte
ef51b5be76
reftests: Add label-shadows test
...
Tests shadows work properly for rotated labels
2011-05-22 05:56:12 +02:00
Benjamin Otte
bd610582b8
tests: Add parser test for shorthands
2011-05-22 05:56:11 +02:00
Benjamin Otte
d7c9d8ce15
tests: Add forgotten file
...
File was forgotten in 8fd6bd323c
2011-05-21 22:48:52 +02:00
Benjamin Otte
7a0600644c
tests: Add missing CSS test
2011-05-19 03:16:03 +02:00
Cosimo Cecchi
d392af2e36
reftests: Check that inherited properties work
2011-05-18 22:17:59 +02:00
Benjamin Otte
25c396409c
reftests: Check style property order
...
Ensure that style properties are read in the correct order, by having a
property twice with vastly different values.
2011-05-18 22:17:58 +02:00
Benjamin Otte
1400644069
reftests: Add a test ensuring selectors don't match children
...
Previously, the selector "Foo" would not only match Foo widgets, but
also all widgets that are descendants of Foo.
2011-05-18 22:17:57 +02:00
Benjamin Otte
f3ed498c5b
reftests: Add a test for descendant CSS selectors match
...
In widget hierarchy like "Foo Bar Bar Baz", we want the selector "Foo >
Bar Baz" to match, because it matches the elements 1, 2 and 4.
Previously, the selector only matches the Bar at position 3 and then
failed because it wasn't preceded by a Foo.
2011-05-18 22:17:56 +02:00
Benjamin Otte
806c804271
reftests: Add a test that checks that * matches regions
2011-05-18 22:17:56 +02:00
Benjamin Otte
dda83e2f98
reftests: Unset background-image in CSS of test
...
Otherwise the test screws up when it's set
2011-05-18 22:17:56 +02:00
Benjamin Otte
b8eac1e130
reftests: Add a check for matching regions only once
2011-05-18 22:17:56 +02:00
Benjamin Otte
710caeb512
tests: Add a test for enum values
2011-05-18 22:17:56 +02:00
Benjamin Otte
8ca799cc39
reftests: Add a test for matching by class
2011-05-18 22:17:56 +02:00
Benjamin Otte
78de3e8180
reftests: Add a test for matching by name
2011-05-18 22:17:56 +02:00
Benjamin Otte
269fe0f347
reftests: Add a test for matching by subtype
2011-05-18 22:17:56 +02:00
Benjamin Otte
90caef4abe
reftests: Add test to check that matching by type works
2011-05-18 22:17:56 +02:00
Benjamin Otte
174cfff50f
tests: Add a test to ensure we handle unknown pseudo-classes correctly
...
1) We want to throw an unknown value
2) We want to skip the whole rule
2011-05-18 22:17:56 +02:00
Benjamin Otte
e7aa125eb0
tests: Add a test for all selector combination
...
The test contains an error where we complain about a duplicate value for
":hover:hover"
2011-05-18 22:17:56 +02:00
Benjamin Otte
ce44c95ce8
tests: Be more verbose in error messages.
...
Also, it makes it easier to copy/paste diffs from the message log...
2011-05-18 22:17:55 +02:00
Benjamin Otte
dd78ab5a2f
tests: Add test that ensures we properly parse the color red
2011-05-18 22:17:55 +02:00
Benjamin Otte
42fb004dfc
tests: Add another parsing test from the css spec
2011-05-18 22:17:55 +02:00
Benjamin Otte
3f07482b10
tests: Add parsing test from the css spec
2011-05-18 22:17:55 +02:00
Benjamin Otte
2b807e574d
tests: Make the parser fail without assertions
...
Use the new g_test_fail() function. This way, the testsuite usually
doesn't crash, but actually finishes.
2011-05-18 22:17:55 +02:00
Benjamin Otte
7ccb9db79e
css: Rewrite the parser
...
Instead of relying on GScanner and its idea of syntax, code up a parser
that obeys the CSS spec.
This also has the great side effect of reporting correct line numbers
and positions.
Also included is a reorganization of the returned error values. Instead
of error values describing what type of syntax error was returned, the
code just returns SYNTAX_ERROR. Other messages exist for when actual
values don't work or when errors shouldn't be fatal due to backwards
compatibility.
2011-05-18 22:17:55 +02:00
Benjamin Otte
058bbb2aec
tests: Add a test for importing nonexistant files
2011-05-18 21:58:47 +02:00
Benjamin Otte
c7ef2225b7
tests: Add tests for cyclic imports
2011-05-18 21:58:47 +02:00
Benjamin Otte
427c97a635
tests: Add test for recursively importing an identical file
2011-05-18 21:58:46 +02:00
Benjamin Otte
77b40f2dcd
tests: Order files by name before adding them as tests
...
Ensures that the order of tests is not dependant on your hard disk.
2011-05-18 21:58:46 +02:00
Benjamin Otte
796d593cc1
tests: Make css-parser test take files as argument
...
Takes the css files to be tested as argument and runs with it.
2011-05-18 21:58:45 +02:00
Benjamin Otte
1f4b09b2fb
tests: Add a test for border parsing
2011-05-18 21:58:45 +02:00
Benjamin Otte
195589feac
tests: Add new test checking weird behavior for declarations
2011-05-18 21:58:44 +02:00
Benjamin Otte
fbf658b04e
tests: Add CSS integer parsing tests
2011-05-18 21:58:44 +02:00
Benjamin Otte
d28816bdba
tests: Add test for booleans to CSS tests
2011-05-18 21:58:44 +02:00
Benjamin Otte
be1da7ef92
tests: (Try to) print the actual enum value in the errors file
...
Instead of gtk-some-error-quark 5, print
GTK_SOME_ERROR_SOMETHING_FAILED.
2011-05-18 21:58:44 +02:00
Benjamin Otte
71b18a9006
test: Add a bunch of default properties to the CSS parser
...
One of each type, so that we can test the parsing of them.
2011-05-18 21:58:44 +02:00
Benjamin Otte
f1307ef428
tests: Make CSS parser pass NULL as error.
...
We are trapping errors via signals now.
2011-05-18 21:58:44 +02:00
Benjamin Otte
2d0162c97b
tests: Check errors in css test
2011-05-18 21:58:44 +02:00
Benjamin Otte
35c9650752
tests: Change the way the code does diffs
...
Use a temp file for intermediate storage and properly unlink that
tempfile after the diff is done.
2011-05-18 21:58:44 +02:00
Benjamin Otte
c18dc15694
tests: Add test for auto-closing at end of file
2011-05-18 21:58:43 +02:00
Benjamin Otte
224d65032e
tests: Add CSS test checking that we don't need a semicolon
2011-05-18 21:58:43 +02:00
Benjamin Otte
8fd6bd323c
tests: Add two simple css tests
2011-05-18 21:58:43 +02:00
Benjamin Otte
64fd32cdef
tests: Add a test for the CSS parser
...
Tests in the parser need 1 or 2 files:
1) test.css
2) test.ref.css (optional, defaults to test.css)
The test instantiates a CSS provider, loads test.css, then dumps the
loaded file to test.out.css and then checks that that file matches
test.ref.css. If not, it dumps a diff between those two to the log and
fails.
You want to run the test with --verbose to get the output dumped to
stdout.
2011-05-18 21:58:43 +02:00
Benjamin Otte
c2f23ccd23
reftests: Add a shell script to create tests
...
See the documentation in the script.
Tests are not yet added as the output from the 2 included scripts
doesn't match and the intended reference output first needs to be agreed
on.
2011-05-13 02:46:15 +02:00
Benjamin Otte
d20aa1f8dc
reftests: Add a test for the label fix
2011-05-12 23:40:26 +02:00