lib/bufferized_ropes: Added tests for bufferized ropes.
authorLucas Bajolet <r4pass@hotmail.com>
Thu, 24 Jul 2014 14:13:58 +0000 (10:13 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Thu, 24 Jul 2014 14:22:11 +0000 (10:22 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

tests/sav/test_flatrope_alt2.res [new file with mode: 0644]
tests/sav/test_ropes_alt2.res [new file with mode: 0644]
tests/sav/test_text_alt3.res [new file with mode: 0644]
tests/test_flatrope.nit
tests/test_ropes.nit
tests/test_text.nit

diff --git a/tests/sav/test_flatrope_alt2.res b/tests/sav/test_flatrope_alt2.res
new file mode 100644 (file)
index 0000000..5ec30ac
--- /dev/null
@@ -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 (file)
index 0000000..3fa08b9
--- /dev/null
@@ -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 (file)
index 0000000..9a83175
--- /dev/null
@@ -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 .
index 4cf5e0b..d08aa03 100644 (file)
@@ -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"
 
index b0cbec3..2d03f50 100644 (file)
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 #alt1 import splay_ropes
+#alt2 import bufferized_ropes
 
 var x :String = new RopeString
 
index 9357645..2b6ef28 100644 (file)
@@ -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)