#!/usr/local/bin/konoha

import "utest.k";

String a = "aaaaa"
String b = "aaa"
String c = "a"
String d = "aabbb"
String e = "aabbcc"
String f = "aaaabbbb"
String g = "b";

print "English check:"

utest("String +",a+b=="aaaaaaaa");

utest("String - String",f-b == "abbbb");

utest("String * int",c*3==b);

utest("String + + *3",c+c+g*3==d);

utest("String /", e/"bb"=="aa");

//utest("String /(2)",b/d==b);
//if String1.getsize()<String2.getSize() then Error

utest("String %",e%"b"=="bcc");
//e%"b" is "bcc", but FAILED

//utest("String /(2)",b/d==b);
//if String1.getsize()<String2.getSize() then SegmentationFault

utest("String in?","cd"in?"aaabcddd");

//utest("String in?","abcde"in?"cd");
//if String1.getsize()>String2.getSize() then SegmentationFault

utest("String [m..+n]",f[2..+5]=="aabbb");

//utest("String[m..+n]",f[2..+9]==???);
//Assertion & Aborted

//utest("String[m..+n] m<0",f[-3..+5]==???);
//Assertion & Aborted

//f[2..+(-1)];
//Aborted

String s5 = "%s{0} %s{1}" %% (3, 5);
print s5, s5.equals("3 5");
utest("String %%",  s5 == "3 5");

print "utest String finished!";
