blob: 58159babcdecfe26a8e003878e4a35bd1d163285 [file] [log] [blame]
[module stringServices('http://www.eclipse.org/emf/2002/Ecore')/]
[template public test(p : EPackage)]
[comment @main/]
[file ('oclAnyTests', false)]
@Test 'test'.oclAsType(String) => ['test'.oclAsType(String)/]
@Test 'test'.oclIsUndefined() => ['test'.oclIsUndefined()/]
@Test 'test'.oclIsTypeOf(String) => ['test'.oclIsTypeOf(String)/]
@Test 'test'.oclIsTypeOf(EPackage) => ['test'.oclIsTypeOf(EPackage)/]
@Test 'test'.oclIsKindOf(String) => ['test'.oclIsKindOf(String)/]
@Test 'test'.oclIsKindOf(EPackage) => ['test'.oclIsKindOf(EPackage)/]
@Test 'test' <> 'toto' => ['test' <> 'toto'/]
@Test 'test' <> 'test' => ['test' <> 'test'/]
@Test 'test' = 'toto' => ['test' = 'toto'/]
@Test 'test' = 'test' => ['test' = 'test'/]
@Test 'test'.toString() => ['test'.toString()/]
@Test 'test'.oclAsSet() => ['test'.oclAsSet()/]
[comment]IRRELEVANT-A4-UNSUPPORTED oclIsInvalid[/comment]
[comment]IRRELEVANT-A4-DIFFERS oclAsType: validation error instead of 'invalid' ['test'.oclAsType(Integer)/][/comment]
[/file]
[file ('testServices', false)]
@Test 'test'.size() => ['test'.size()/]
@Test '12'.toInteger() => ['12'.toInteger()/]
@Test '1.2'.toReal() => ['1.2'.toReal()/]
@Test 'test'.toUpper() => ['test'.toUpper()/]
@Test 'TEST'.toLower() => ['TEST'.toLower()/]
@Test 'test'.contains('es') => ['test'.contains('es')/]
@Test 'test'.contains('toto') => ['test'.contains('toto')/]
@Test 'test'.endsWith('st') => ['test'.endsWith('st')/]
@Test 'test'.endsWith('toto') => ['test'.endsWith('toto')/]
@Test 'test'.replaceAll('t', 'z') => ['test'.replaceAll('t', 'z')/]
@Test 'test'.tokenize() => ['test'.tokenize()/]
@Test ' test '.trim() => [' test '.trim()/]
@Test 'test'.strcmp('test') => ['test'.strcmp('test')/]
@Test 'test'.strstr('es') => ['test'.strstr('es')/]
@Test 'test'.strstr('toto') => ['test'.strstr('toto')/]
@Test 'test'.concat('test') => ['test'.concat('test')/]
@Test 'test'.equalsIgnoreCase('tEsT') => ['test'.equalsIgnoreCase('tEsT')/]
@Test 'test'.equalsIgnoreCase('toto') => ['test'.equalsIgnoreCase('toto')/]
@Test 'test'.first(2) => ['test'.first(2)/]
@Test 'test'.isAlpha() => ['test'.isAlpha()/]
@Test 'test1'.isAlpha() => ['test1'.isAlpha()/]
@Test 'test'.isAlphanum() => ['test'.isAlphanum()/]
@Test 'test1'.isAlphanum() => ['test1'.isAlphanum()/]
@Test '111'.isAlphanum() => ['111'.isAlphanum()/]
@Test 'test'.last(2) => ['test'.last(2)/]
@Test 'test'.lastIndex('a') => ['test'.lastIndex('a')/]
@Test 'test'.lastIndex('t') => ['test'.lastIndex('t')/]
@Test 'test'.matches('test') => ['test'.matches('test')/]
@Test 'test'.prefix('pre') => ['test'.prefix('pre')/]
@Test 'test'.replace('te', 'ta') => ['test'.replace('te', 'ta')/]
@Test 'test'.startsWith('te') => ['test'.startsWith('te')/]
@Test 'test'.startsWith('toto') => ['test'.startsWith('toto')/]
@Test 'test'.substitute('te', 'ta') => ['test'.substitute('te', 'ta')/]
@Test 'test'.substituteAll('t', 'z') => ['test'.substituteAll('t', 'z')/]
@Test 'test'.substring(2) => ['test'.substring(2)/]
@Test 'test'.substring(2,3) => ['test'.substring(2,3)/]
@Test 'test'.toUpperCase() => ['test'.toUpperCase()/]
@Test 'test'.toUpperFirst() => ['test'.toUpperFirst()/]
@Test 'TEST'.toLowerCase() => ['TEST'.toLowerCase()/]
@Test 'TEST'.toLowerFirst() => ['TEST'.toLowerFirst()/]
@Test 'test'.tokenize() => ['test'.tokenize()/]
@Test 'test'.at(2) => ['test'.at(2)/]
@Test 'test'.characters() => ['test'.characters()/]
[comment]A4-UNSUPPORTED tokenizeLine[/comment]
[comment]A4-UNSUPPORTED strtok[/comment]
[comment]A4-UNSUPPORTED substituteFirst[/comment]
[comment]A4-UNSUPPORTED replaceFirst[/comment]
[comment]A4-UNSUPPORTED lineSeparator[/comment]
[comment]IRRELEVANT-A4-DIFFERS toBoolean, toReal, toInteger with incorrect value: validation error instead of 'invalid'[/comment]
[/file]
[file ('testAdd', false)]
@Test 'a' + 'b' => ['a' + 'b'/]
@Test 'a' + 'b' + 'c' => ['a' + 'b' + 'c'/]
@Test 'a' + 'test' => ['a' + 'test'/]
@Test 'a' + 'test' + 'c' => ['a' + 'test' + 'c'/]
@Test 'a' + p.name => ['a' + p.name/]
@Test 'a' + p.name + 'c' => ['a' + p.name + 'c'/]
@Test 'a' + p.name + 'c' + 'test' => ['a' + p.name + 'c' + 'test'/]
[/file]
[/template]