grantlee:pinos-grantlee.git
5 years agoRemove unused variables.
Stephen Kelly [Sat, 20 Oct 2012 06:45:27 +0000 (08:45 +0200)]
Remove unused variables.

5 years agoFix some includes.
Stephen Kelly [Sun, 12 Aug 2012 14:04:08 +0000 (16:04 +0200)]
Fix some includes.

5 years agoUse a QVector of filters instead of a QList.
Stephen Kelly [Mon, 26 Dec 2011 23:33:57 +0000 (00:33 +0100)]
Use a QVector of filters instead of a QList.

5 years agoAssert on the required internal type in a cycle tag.
Stephen Kelly [Mon, 26 Dec 2011 23:29:15 +0000 (00:29 +0100)]
Assert on the required internal type in a cycle tag.

5 years agoTest the null localizer plural behaviour.
Stephen Kelly [Mon, 26 Dec 2011 23:27:37 +0000 (00:27 +0100)]
Test the null localizer plural behaviour.

5 years agoTest the population of the externalMedia context container.
Stephen Kelly [Mon, 26 Dec 2011 23:26:45 +0000 (00:26 +0100)]
Test the population of the externalMedia context container.

5 years agoTest MetaEnumVariable default ctor.
Stephen Kelly [Mon, 26 Dec 2011 23:26:14 +0000 (00:26 +0100)]
Test MetaEnumVariable default ctor.

5 years agoUse QLocale provided numerical parsing instead of guess-work.
Stephen Kelly [Mon, 26 Dec 2011 23:23:33 +0000 (00:23 +0100)]
Use QLocale provided numerical parsing instead of guess-work.

5 years agoUse iterators instead of Q_FOREACH to avoid container copies.
Stephen Kelly [Mon, 26 Dec 2011 23:22:28 +0000 (00:22 +0100)]
Use iterators instead of Q_FOREACH to avoid container copies.

5 years agoAssert expected invariant instead of testing it.
Stephen Kelly [Mon, 26 Dec 2011 23:21:50 +0000 (00:21 +0100)]
Assert expected invariant instead of testing it.

5 years agobreak instead of return 'early' from a function.
Stephen Kelly [Mon, 26 Dec 2011 23:20:18 +0000 (00:20 +0100)]
break instead of return 'early' from a function.

Satisfies TestCocoon loop coverage logic.

5 years agoExpect tested loop termination.
Stephen Kelly [Mon, 26 Dec 2011 23:20:01 +0000 (00:20 +0100)]
Expect tested loop termination.

5 years agoRemove unused methods.
Stephen Kelly [Mon, 26 Dec 2011 23:19:00 +0000 (00:19 +0100)]
Remove unused methods.

5 years agoRemove unnecessary runtime check.
Stephen Kelly [Mon, 26 Dec 2011 23:18:08 +0000 (00:18 +0100)]
Remove unnecessary runtime check.

Using qobject_cast on a 0 works as expected already. The if() gains
us nothing.

5 years agoCombine two ctors into one.
Stephen Kelly [Mon, 26 Dec 2011 23:17:34 +0000 (00:17 +0100)]
Combine two ctors into one.

5 years agoLet Qt report the error on an empty container.
Stephen Kelly [Mon, 26 Dec 2011 23:16:22 +0000 (00:16 +0100)]
Let Qt report the error on an empty container.

5 years agoRemove dead code.
Stephen Kelly [Mon, 26 Dec 2011 23:15:30 +0000 (00:15 +0100)]
Remove dead code.

Don't use assert() + if(). The assert is enough.

5 years agoRemove dead code.
Stephen Kelly [Mon, 26 Dec 2011 23:14:34 +0000 (00:14 +0100)]
Remove dead code.

Assert what is guaranteed by the state machine rather than checking
for it.

5 years agoFix style.
Stephen Kelly [Mon, 26 Dec 2011 23:14:07 +0000 (00:14 +0100)]
Fix style.

5 years agoUse iterators instead of Q_FOREACH
Stephen Kelly [Mon, 26 Dec 2011 23:13:36 +0000 (00:13 +0100)]
Use iterators instead of Q_FOREACH

Ensures that we never copy the container.

5 years agoCheck for int, not long.
Stephen Kelly [Mon, 26 Dec 2011 23:12:50 +0000 (00:12 +0100)]
Check for int, not long.

This is already converted by other code.

5 years agoTest behavior of _() syntax.
Stephen Kelly [Mon, 26 Dec 2011 23:30:16 +0000 (00:30 +0100)]
Test behavior of _() syntax.

5 years agoTest expected results of the localizer on a Context.
Stephen Kelly [Tue, 20 Dec 2011 03:15:02 +0000 (04:15 +0100)]
Test expected results of the localizer on a Context.

5 years agoAdd some tests for assignment and copy construction.
Stephen Kelly [Tue, 20 Dec 2011 03:14:35 +0000 (04:14 +0100)]
Add some tests for assignment and copy construction.

6 years agoRemove dead code and test for QMap lookup.
Stephen Kelly [Sat, 3 Dec 2011 19:53:19 +0000 (20:53 +0100)]
Remove dead code and test for QMap lookup.

6 years agoRemove some dead code from variable parsing.
Stephen Kelly [Sat, 3 Dec 2011 17:50:35 +0000 (18:50 +0100)]
Remove some dead code from variable parsing.

FilterExpression already does most variable parsing for us.

6 years agoRemove truth tests and implement NullTest in terms of the base test.
Stephen Kelly [Sat, 3 Dec 2011 17:19:53 +0000 (18:19 +0100)]
Remove truth tests and implement NullTest in terms of the base test.

6 years agoRemove dead code.
Stephen Kelly [Sat, 3 Dec 2011 17:19:11 +0000 (18:19 +0100)]
Remove dead code.

The base trait needs no implementation. The specializations
always provide an implementation.

6 years agoTest last tag followed by non-newline.
Stephen Kelly [Sat, 3 Dec 2011 16:46:51 +0000 (17:46 +0100)]
Test last tag followed by non-newline.

6 years agoMake sure wrapping non-literals with lookups in _() works.
Stephen Kelly [Sat, 3 Dec 2011 16:14:17 +0000 (17:14 +0100)]
Make sure wrapping non-literals with lookups in _() works.

6 years agoAdd QString as an output type.
Stephen Kelly [Sat, 3 Dec 2011 16:12:15 +0000 (17:12 +0100)]
Add QString as an output type.

This means it is not special cased in Variable, and it is still
escaped in Node::streamValueInContext.

6 years agoIf canConvert( QVariant::String ) works, convert() will too.
Stephen Kelly [Sat, 3 Dec 2011 15:25:35 +0000 (16:25 +0100)]
If canConvert( QVariant::String ) works, convert() will too.

6 years agoTest the empty template.
Stephen Kelly [Sat, 3 Dec 2011 15:20:16 +0000 (16:20 +0100)]
Test the empty template.

6 years agoTest an unterminated if tag.
Stephen Kelly [Sat, 3 Dec 2011 15:05:22 +0000 (16:05 +0100)]
Test an unterminated if tag.

6 years agoTest an unclosed comment tag.
Stephen Kelly [Sat, 3 Dec 2011 15:05:02 +0000 (16:05 +0100)]
Test an unclosed comment tag.

6 years agoStart tests for load tag.
Stephen Kelly [Sat, 3 Dec 2011 15:04:44 +0000 (16:04 +0100)]
Start tests for load tag.

6 years agoA block tag always has a next TextNode.
Stephen Kelly [Sat, 3 Dec 2011 14:54:48 +0000 (15:54 +0100)]
A block tag always has a next TextNode.

6 years agoTest for a non-existant Qt enum
Stephen Kelly [Sat, 3 Dec 2011 14:01:31 +0000 (15:01 +0100)]
Test for a non-existant Qt enum

6 years agoRemove dead code.
Stephen Kelly [Sat, 3 Dec 2011 14:00:24 +0000 (15:00 +0100)]
Remove dead code.

Assert the last possible case instead of testing it.

6 years agoTest std::list in templates.
Stephen Kelly [Sat, 3 Dec 2011 13:59:58 +0000 (14:59 +0100)]
Test std::list in templates.

6 years agoActually use the literal value instead of the (empty) var.
Stephen Kelly [Sat, 3 Dec 2011 01:50:44 +0000 (02:50 +0100)]
Actually use the literal value instead of the (empty) var.

6 years agoFix handling of empty block tags.
Stephen Kelly [Sat, 3 Dec 2011 01:49:44 +0000 (02:49 +0100)]
Fix handling of empty block tags.

Previous implementation left dead code.

6 years agoRemove dead code. The parser must be a child of the engine.
Stephen Kelly [Sat, 3 Dec 2011 01:49:07 +0000 (02:49 +0100)]
Remove dead code. The parser must be a child of the engine.

6 years agoTest the empty string for isalpha.
Stephen Kelly [Wed, 30 Nov 2011 12:00:05 +0000 (13:00 +0100)]
Test the empty string for isalpha.

6 years agoTest more methods built into string.
Stephen Kelly [Wed, 30 Nov 2011 11:59:49 +0000 (12:59 +0100)]
Test more methods built into string.

6 years agoTest the load tag with no arguments.
Stephen Kelly [Wed, 30 Nov 2011 11:51:10 +0000 (12:51 +0100)]
Test the load tag with no arguments.

6 years agoTest the metatype API with invalid arguments.
Stephen Kelly [Wed, 30 Nov 2011 11:50:38 +0000 (12:50 +0100)]
Test the metatype API with invalid arguments.

6 years agoTest accessing non-existent properties on containers.
Stephen Kelly [Wed, 30 Nov 2011 11:49:39 +0000 (12:49 +0100)]
Test accessing non-existent properties on containers.

6 years agoTest invalid arguments to the range tag.
Stephen Kelly [Wed, 30 Nov 2011 11:49:05 +0000 (12:49 +0100)]
Test invalid arguments to the range tag.

6 years agoTest for another error in filter tag.
Stephen Kelly [Wed, 30 Nov 2011 11:48:12 +0000 (12:48 +0100)]
Test for another error in filter tag.

Attempting to use the escape filter with the filter tag is an error.

6 years agoTest extra and invalid arguments in autoescape tag.
Stephen Kelly [Wed, 30 Nov 2011 11:47:33 +0000 (12:47 +0100)]
Test extra and invalid arguments in autoescape tag.

6 years agoTest ifchanged outside of a for loop.
Stephen Kelly [Wed, 30 Nov 2011 11:46:41 +0000 (12:46 +0100)]
Test ifchanged outside of a for loop.

6 years agoTest that ifequal with only one argument to compare is an error.
Stephen Kelly [Wed, 30 Nov 2011 11:46:11 +0000 (12:46 +0100)]
Test that ifequal with only one argument to compare is an error.

6 years agoTest for errors in for tag.
Stephen Kelly [Wed, 30 Nov 2011 11:45:31 +0000 (12:45 +0100)]
Test for errors in for tag.

Empty, wrong number of keywords, and empty argument are tested.

6 years agoTest for empty if tag.
Stephen Kelly [Wed, 30 Nov 2011 11:45:17 +0000 (12:45 +0100)]
Test for empty if tag.

6 years agoTest smartTrim accessors.
Stephen Kelly [Wed, 30 Nov 2011 11:44:36 +0000 (12:44 +0100)]
Test smartTrim accessors.

6 years agoTest comparison of an enum with an int.
Stephen Kelly [Wed, 30 Nov 2011 11:43:40 +0000 (12:43 +0100)]
Test comparison of an enum with an int.

6 years agoTest the accessor for templateLoaders.
Stephen Kelly [Wed, 30 Nov 2011 11:43:12 +0000 (12:43 +0100)]
Test the accessor for templateLoaders.

6 years agoRemove dead code.
Stephen Kelly [Wed, 30 Nov 2011 11:42:21 +0000 (12:42 +0100)]
Remove dead code.

Block is the last kind of token at this point. All others have
already been handled.

6 years agoRemove dead code.
Stephen Kelly [Wed, 30 Nov 2011 11:41:20 +0000 (12:41 +0100)]
Remove dead code.

There is always a next Text token after a variable or block,
even if it is empty.

6 years agoRemove dead code.
Stephen Kelly [Wed, 30 Nov 2011 11:41:03 +0000 (12:41 +0100)]
Remove dead code.

appendContent is never called.

6 years agoTest for errors on invalid filter syntax.
Stephen Kelly [Wed, 30 Nov 2011 11:38:19 +0000 (12:38 +0100)]
Test for errors on invalid filter syntax.

6 years agoTest the debug tag.
Stephen Kelly [Wed, 30 Nov 2011 11:37:41 +0000 (12:37 +0100)]
Test the debug tag.

6 years agoTest the rest of the cycle tag.
Stephen Kelly [Wed, 30 Nov 2011 11:37:08 +0000 (12:37 +0100)]
Test the rest of the cycle tag.

6 years agoRemove dead code.
Stephen Kelly [Wed, 30 Nov 2011 11:36:05 +0000 (12:36 +0100)]
Remove dead code.

Invalidity is based on they type of the variant, so no point in
testing it twice.

6 years agoFix and test invalid use of the empty cycle tag.
Stephen Kelly [Wed, 30 Nov 2011 11:35:14 +0000 (12:35 +0100)]
Fix and test invalid use of the empty cycle tag.

6 years agoRemove the ssi tag.
Stephen Kelly [Tue, 29 Nov 2011 04:04:09 +0000 (05:04 +0100)]
Remove the ssi tag.

It has never been part of a release.

6 years agoifdef the reserve out before Qt 4.7 when it was introduced.
Stephen Kelly [Mon, 28 Nov 2011 22:38:46 +0000 (23:38 +0100)]
ifdef the reserve out before Qt 4.7 when it was introduced.

6 years agoDon't depend on widgets without a reason to.
Stephen Kelly [Sun, 27 Nov 2011 19:25:57 +0000 (20:25 +0100)]
Don't depend on widgets without a reason to.

6 years agoFix style.
Stephen Kelly [Sun, 27 Nov 2011 18:33:41 +0000 (19:33 +0100)]
Fix style.

6 years agoReserve the size of the list required.
Stephen Kelly [Sun, 27 Nov 2011 18:23:57 +0000 (19:23 +0100)]
Reserve the size of the list required.

6 years agoImplement convenience to get the size and count from a container.
Stephen Kelly [Sun, 27 Nov 2011 17:53:13 +0000 (18:53 +0100)]
Implement convenience to get the size and count from a container.

6 years agoRemove unused.
Stephen Kelly [Sun, 27 Nov 2011 17:50:51 +0000 (18:50 +0100)]
Remove unused.

6 years agoImplement dictsort filter.
Stephen Kelly [Sun, 27 Nov 2011 14:05:24 +0000 (15:05 +0100)]
Implement dictsort filter.

6 years agoAdd API to get components of a Variable.
Stephen Kelly [Sun, 27 Nov 2011 14:05:43 +0000 (15:05 +0100)]
Add API to get components of a Variable.

6 years agoGuard against multiple find_package calls.
Stephen Kelly [Mon, 7 Nov 2011 15:31:59 +0000 (16:31 +0100)]
Guard against multiple find_package calls.

6 years agoTest for working tr1/unordered_map.
Stephen Kelly [Sun, 6 Nov 2011 16:49:37 +0000 (17:49 +0100)]
Test for working tr1/unordered_map.

On Apple Leopard, the assignment operator and copy constructor don't work
for that class.

6 years agoDo not save the execution report of each plugin 0.2 v0.2.0
Sébastien Fricker [Mon, 31 Oct 2011 07:15:20 +0000 (08:15 +0100)]
Do not save the execution report of each plugin

The __coveragescanner_register_library handles it automatically now.

6 years agoRegister plugins to TestCocoon after loading it
Sébastien Fricker [Sun, 30 Oct 2011 20:29:05 +0000 (21:29 +0100)]
Register plugins to TestCocoon after loading it

6 years agoSilence warning about multi-line comments.
Stephen Kelly [Wed, 26 Oct 2011 19:19:17 +0000 (21:19 +0200)]
Silence warning about multi-line comments.

Also wrap the header in an include guard.

6 years agoSilence unused warning.
Stephen Kelly [Wed, 26 Oct 2011 19:18:38 +0000 (21:18 +0200)]
Silence unused warning.

6 years agoDon't run moc on filters.
Stephen Kelly [Wed, 26 Oct 2011 19:17:22 +0000 (21:17 +0200)]
Don't run moc on filters.

Filters are not QObjects.

6 years agoAvoid double-compiling files for tests.
Stephen Kelly [Wed, 26 Oct 2011 18:59:52 +0000 (20:59 +0200)]
Avoid double-compiling files for tests.

6 years agoExport the NullLocalizer for testing.
Stephen Kelly [Wed, 26 Oct 2011 18:58:44 +0000 (20:58 +0200)]
Export the NullLocalizer for testing.

6 years agoAdd an import macro for internal classes needed for tests.
Stephen Kelly [Wed, 26 Oct 2011 18:58:00 +0000 (20:58 +0200)]
Add an import macro for internal classes needed for tests.

6 years agoAdd a script for convenience to generate testcocoon data.
Stephen Kelly [Wed, 26 Oct 2011 18:28:15 +0000 (20:28 +0200)]
Add a script for convenience to generate testcocoon data.

6 years agoEnsure that testcocoon can find the plugins for instrumentation.
Stephen Kelly [Wed, 26 Oct 2011 18:15:34 +0000 (20:15 +0200)]
Ensure that testcocoon can find the plugins for instrumentation.

6 years agoMake the minimum plugin version available through the config file.
Stephen Kelly [Mon, 24 Oct 2011 17:42:48 +0000 (19:42 +0200)]
Make the minimum plugin version available through the config file.

This is used to ensure plugins of compatible versions can be loaded.

6 years agoRemove unneeded comma.
Stephen Kelly [Tue, 18 Oct 2011 22:38:59 +0000 (00:38 +0200)]
Remove unneeded comma.

6 years agoEnsure that my personal gpg key is used for signing.
Stephen Kelly [Tue, 18 Oct 2011 21:54:55 +0000 (23:54 +0200)]
Ensure that my personal gpg key is used for signing.

6 years agoAlso run the tests in another locale to be sure.
Stephen Kelly [Tue, 18 Oct 2011 21:54:38 +0000 (23:54 +0200)]
Also run the tests in another locale to be sure.

6 years agoFix unused-but-set warnings.
Stephen Kelly [Tue, 18 Oct 2011 21:46:27 +0000 (23:46 +0200)]
Fix unused-but-set warnings.

6 years agoRemove hardcoded values from the expected output of NullLocalizer. v0.2.0-rc2
Stephen Kelly [Wed, 5 Oct 2011 22:39:11 +0000 (00:39 +0200)]
Remove hardcoded values from the expected output of NullLocalizer.

The exact output depends on the locale so is not easily predictable.

6 years agoGenerate a define for whether we have tr1.
Stephen Kelly [Wed, 5 Oct 2011 21:31:36 +0000 (23:31 +0200)]
Generate a define for whether we have tr1.

It is used for 'custom' containers in the unit tests.

6 years agoInstall the GrantleeParseArguments file.
Stephen Kelly [Thu, 22 Sep 2011 22:34:58 +0000 (00:34 +0200)]
Install the GrantleeParseArguments file.

Also look for it in the correct place, and before attempting to
use its contents.

BUG: 282512

6 years agoCompare with direct expected date output instead of hardcoded.
Stephen Kelly [Mon, 19 Sep 2011 19:58:16 +0000 (21:58 +0200)]
Compare with direct expected date output instead of hardcoded.

QDate::toString localises output, making tests fail.

6 years agoAttempt to exclude the build directory from coverage analysis.
Stephen Kelly [Sat, 17 Sep 2011 19:25:08 +0000 (21:25 +0200)]
Attempt to exclude the build directory from coverage analysis.

6 years agoGenerate coverage data for plugins too.
Sébastien Fricker [Sat, 17 Sep 2011 19:24:09 +0000 (21:24 +0200)]
Generate coverage data for plugins too.

6 years agoFix typos in the pedantic flag.
Stephen Kelly [Sun, 4 Sep 2011 18:59:51 +0000 (20:59 +0200)]
Fix typos in the pedantic flag.

6 years agoRemove the plugin macro wrapper.
Stephen Kelly [Fri, 2 Sep 2011 15:34:37 +0000 (17:34 +0200)]
Remove the plugin macro wrapper.

It breaks collection of regular coverage data.