Add initial unit testing framework. See #438.

This commit is contained in:
brectanus
2007-12-19 00:09:30 +00:00
parent 2657154eaa
commit 499c3f3167
54 changed files with 2249 additions and 3 deletions

View File

@@ -0,0 +1,155 @@
### Empty
{
type => "tfns",
name => "replaceComments",
input => "",
output => "",
ret => 0,
},
### Nothing
{
type => "tfns",
name => "replaceComments",
input => "TestCase",
output => "TestCase",
ret => 0,
},
{
type => "tfns",
name => "replaceComments",
input => "Test\0Case",
output => "Test\0Case",
ret => 0,
},
### Basics
{
type => "tfns",
name => "replaceComments",
input => "/* TestCase */",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/*TestCase*/",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/* TestCase*/",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/*TestCase */",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Before/* TestCase */After",
output => "Before After",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Before /* TestCase */ After",
output => "Before After",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/* Test\nCase */",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/* Test\x0d\x0aCase */",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/* Test\x0aCase */",
output => " ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "/* Test\x0dCase */",
output => " ",
ret => 1,
},
### Broken Comments
{
type => "tfns",
name => "replaceComments",
input => "Before/* Test\x0d\x0aCase ",
output => "Before ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Before /* Test\x0aCase ",
output => "Before ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Before/* Test\x0d\x0aCase ",
output => "Before ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Before /* Test\x0aCase ",
output => "Before ",
ret => 1,
},
{
type => "tfns",
name => "replaceComments",
input => "Test\x0d\x0aCase */After",
output => "Test\x0d\x0aCase */After",
ret => 0,
},
{
type => "tfns",
name => "replaceComments",
input => "Test\x0aCase */ After",
output => "Test\x0aCase */ After",
ret => 0,
},
{
type => "tfns",
name => "replaceComments",
input => "Test\x0d\x0aCase */After",
output => "Test\x0d\x0aCase */After",
ret => 0,
},
{
type => "tfns",
name => "replaceComments",
input => "Test\x0aCase */ After",
output => "Test\x0aCase */ After",
ret => 0,
},