Commit Graph

2 Commits (7c8aa660d18d7c8d66ac04ae33585120885ad493)

Author SHA1 Message Date
Martin Gräßlin 1f97345e35 Asserts for KWin scripts
Further debugging functionality for KWin scripts. Added assert
methods validate the to be tested parameter and throw a script
error if the value is not valid.

Following methods are available:
* assert(value)
* assertTrue(boolean)
* assertFalse(boolean)
* assertEquals(expected, actual)
* assertNull(nullValue)
* assertNotNull(notNullValue)

All methods take an additional optional parameter which is used
as the error message if provided.

Methods to validate the number of arguments and types of the
parameters are added and throw syntax or type errors.

REVIEW: 104870
2012-05-10 10:00:54 +02:00
Martin Gräßlin e59a96b57c Documentation for global JavaScript methods/properties
The documentation is in an XML file which mimics the
XML output of doxygen, which can be converted to
MediaWiki syntax with the tools found in
kde:scratch/graesslin/kwin-scripting-api-generator git
repository.

BUG: 297640
FIXED-IN: 4.9.0
2012-04-10 20:41:57 +02:00