1 |
from gzz.gfx.gl import GL_Testing |
from gzz.gfx.gl import GL_Testing |
2 |
import java.lang.String |
import java.lang.String |
3 |
|
|
4 |
def strcmp(original, looped): |
def requiresJNI(): |
5 |
failIf(original != looped) |
pass |
6 |
|
|
7 |
def testUniAZ(): |
def testUniAZ(): |
8 |
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" |
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" |
9 |
strcmp(str, GL_Testing.loopUnistrConv(str)) |
failIf(str != GL_Testing.loopUnistrConv(str), |
10 |
|
"Characters corrupted during unistring conversion.") |
11 |
|
|
12 |
def testUniAZPhrase(): |
def testUniAZPhrase(): |
13 |
str = "A little green fox jumped over my backyards fence." |
str = "A little green fox jumped over my backyards fence." |
14 |
strcmp(str, GL_Testing.loopUnistrConv(str)) |
failIf(str != GL_Testing.loopUnistrConv(str), |
15 |
|
"Phrase corrupted during unistring conversion.") |
16 |
|
|
17 |
def testUniScand(): |
def testUniScand(): |
18 |
str = "ÅåÄäÖö" |
str = "ÅåÄäÖö" |
19 |
strcmp(str, GL_Testing.loopUnistrConv(str)) |
failIf(str != GL_Testing.loopUnistrConv(str), |
20 |
|
"Scandinavian characters corrupted during unistring conversion.") |
21 |
|
|
22 |
def testUniScandPhrase(): |
def testUniScandPhrase(): |
23 |
str = "Viime yönä Åke jutteli Äreälle Örisijälle åskardeista." |
str = "Viime yönä Åke jutteli Äreälle Örisijälle åskardeista." |
24 |
strcmp(str, GL_Testing.loopUnistrConv(str)) |
failIf(str != GL_Testing.loopUnistrConv(str), |
25 |
|
"Phrase using scandinavian characters correupted during \ |
26 |
|
unistring conversion.") |
27 |
|
|
28 |
def testUniScandJavaSubstr(): |
def testUniScandJavaSubstr(): |
29 |
str = java.lang.String("Viime yönä Åke jutteli Äreälle Örisijälle åskardeista.") |
str = java.lang.String("Viime yönä Åke jutteli Äreälle Örisijälle åskardeista.") |
30 |
strcmp(str.substring(5,20), GL_Testing.loopUnistrConv(str.substring(5,20))) |
failIf(str.substring(5,20) != GL_Testing.loopUnistrConv(str.substring(5,20)), |
31 |
|
"Substring of phrase using scandinavian chraracters corrupted \ |
32 |
|
during unistring conversion.") |
33 |
|
|
34 |
def testStdAZ(): |
def testStdAZ(): |
35 |
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" |
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" |
36 |
strcmp(str, GL_Testing.loopStdstrConv(str)) |
failIf(str != GL_Testing.loopStdstrConv(str), |
37 |
|
"Characters corrupted during std::string conversion.") |
38 |
|
|
39 |
def testStdAZPhrase(): |
def testStdAZPhrase(): |
40 |
str = "A little green fox jumped over my backyards fence." |
str = "A little green fox jumped over my backyards fence." |
41 |
strcmp(str, GL_Testing.loopStdstrConv(str)) |
failIf(str != GL_Testing.loopStdstrConv(str), |
42 |
|
"Phrase corrupted during std::string conversion.") |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|