Tree [65a56e] default / test /
History



File Date Author Commit
examples 2013-04-14 nyamatongwe nyamatongwe [35b4a1] Adding example file extensions to native file s...
unit 2013-04-19 nyamatongwe nyamatongwe [376046] Using std::fill instead of a loop is much faste...
MessageNumbers.py 2009-05-12 nyamatongwe nyamatongwe [996960] Include tests in standard repository.
README 2012-05-29 nyamatongwe nyamatongwe [ae4d2f] Updated to mention tests run on Python 2.7.
XiteMenu.py 2011-07-25 nyamatongwe nyamatongwe [99d3e5] Using 'from __future__ import unicode_literals'...
XiteWin.py 2013-05-10 nyamatongwe nyamatongwe [b963f0] Handle most stringresult methods generically.
lexTests.py 2013-04-05 nyamatongwe nyamatongwe [babb00] Added tests for Ruby and Perl lexers.
performanceTests.py 2011-07-25 nyamatongwe nyamatongwe [99d3e5] Using 'from __future__ import unicode_literals'...
simpleTests.py 2013-05-10 nyamatongwe nyamatongwe [b963f0] Handle most stringresult methods generically.
xite.py 2009-05-12 nyamatongwe nyamatongwe [996960] Include tests in standard repository.

Read Me

The test directory contains some unit and performance tests for Scintilla.

The tests can only be run on Windows using Python 2.7 or 3.x. Running on another platform
would require writing a file similar to XiteWin.py for that platform. Python 2.7+ is required 
because the bytes string type and literals are available.

A test application is in xite.py and this can be run to experiment:
pythonw xite.py

To run the basic tests:
pythonw simpleTests.py

There are some lexing tests with simple input files in several languages in the examples 
subdirectory and their expected lexed states in *.styled where the start of each style 
is marked with {styleNumber}, for example:
{15}<%@{16}language=javas{15}%>{0}

To run the lexing tests:
pythonw lexTests.py

To check for performance regressions:
pythonw performanceTests.py
While each test run will be different and the timer has only limited granularity, some results
from a 2 GHz Athlon with a DEBUG build are:
 0.187 testAddLine
. 0.203 testAddLineMiddle
. 0.171 testHuge
. 0.203 testHugeInserts
. 0.312 testHugeReplace
.