From: Lucas Bajolet Date: Thu, 24 Jul 2014 14:13:58 +0000 (-0400) Subject: lib/bufferized_ropes: Added tests for bufferized ropes. X-Git-Tag: v0.6.7~18^2~3 X-Git-Url: http://nitlanguage.org lib/bufferized_ropes: Added tests for bufferized ropes. Signed-off-by: Lucas Bajolet --- diff --git a/tests/sav/test_flatrope_alt2.res b/tests/sav/test_flatrope_alt2.res new file mode 100644 index 0000000..5ec30ac --- /dev/null +++ b/tests/sav/test_flatrope_alt2.res @@ -0,0 +1,5 @@ +quick brown fox over the lazy dog +The quick brown fox over the lazy dog +quick brown fox jumps over the lazy dog +quick brown fox over the lazy dog. +The quick brown fox jumps over the lazy dog. diff --git a/tests/sav/test_ropes_alt2.res b/tests/sav/test_ropes_alt2.res new file mode 100644 index 0000000..3fa08b9 --- /dev/null +++ b/tests/sav/test_ropes_alt2.res @@ -0,0 +1,26 @@ +NODEATTEST +INZZ +INDDZZ +EEINDDZZ +EEINDDZZFF +eeinddzzff +EEINDDZZFF +FFZZDDNIEE +hello_world.types.1.o +now step live... +...evil pets won +now step live... +now step live... + live... +. +now step live +...evil pets won +n +now step live... step live... +w s +ZZ +ZZZZZZZZZZ +ZZAAZZZZZZZZ +NNZZAAZZZZZZZZ +NIINZZAAZZZZZZZZ +NINIINZZAAZZZZZZZZINZZAAZZZZZZZZ diff --git a/tests/sav/test_text_alt3.res b/tests/sav/test_text_alt3.res new file mode 100644 index 0000000..9a83175 --- /dev/null +++ b/tests/sav/test_text_alt3.res @@ -0,0 +1,12 @@ +Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. +Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six. +235 +13 +110 +-1 +106 +37 +true +true +Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six. +W o e t o y o u , o h e a r t h a n d s e a f o r t h e D e v i l s e n d s t h e b e a s t w i t h w r a t h b e c a u s e h e k n o w s t h e t i m e i s s h o r t . L e t h i m w h o h a t h u n d e r s t a n d i n g r e c k o n t h e n u m b e r o f t h e b e a s t , f o r i t i s a h u m a n n u m b e r , i t s n u m b e r i s S i x H u n d r e d a n d S i x t y - S i x . diff --git a/tests/test_flatrope.nit b/tests/test_flatrope.nit index 4cf5e0b..d08aa03 100644 --- a/tests/test_flatrope.nit +++ b/tests/test_flatrope.nit @@ -13,6 +13,7 @@ # limitations under the License. #alt1 import splay_ropes +#alt2 import bufferized_ropes var st = "quick brown fox over the lazy dog" diff --git a/tests/test_ropes.nit b/tests/test_ropes.nit index b0cbec3..2d03f50 100644 --- a/tests/test_ropes.nit +++ b/tests/test_ropes.nit @@ -13,6 +13,7 @@ # limitations under the License. #alt1 import splay_ropes +#alt2 import bufferized_ropes var x :String = new RopeString diff --git a/tests/test_text.nit b/tests/test_text.nit index 9357645..2b6ef28 100644 --- a/tests/test_text.nit +++ b/tests/test_text.nit @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +#alt3 import bufferized_ropes + var str = "Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short. Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six." var spaces = " " var numstr = "1001" @@ -36,6 +38,12 @@ num = numstr #alt2 trimable = trimable + spaces #alt2 num = new RopeString.from(numstr) +#alt3 txt = new RopeString.from(str) +#alt3 trimable = new RopeString.from(spaces) +#alt3 trimable = trimable + str +#alt3 trimable = trimable + spaces +#alt3 num = new RopeString.from(numstr) + # Test Text methods on all types of receivers print txt.substring(0, 105)