]> gitweb.factorcode.org Git - factor.git/commitdiff
rosetta-code.gnome-sort: add some tests
authorAlexander Iljin <ajsoft@yandex.ru>
Sat, 18 Mar 2017 22:17:13 +0000 (01:17 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 18 Mar 2017 23:44:14 +0000 (16:44 -0700)
extra/rosetta-code/gnome-sort/gnome-sort-tests.factor [new file with mode: 0644]

diff --git a/extra/rosetta-code/gnome-sort/gnome-sort-tests.factor b/extra/rosetta-code/gnome-sort/gnome-sort-tests.factor
new file mode 100644 (file)
index 0000000..473dcaf
--- /dev/null
@@ -0,0 +1,10 @@
+! Copyright (C) 2017 Alexander Ilin.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test rosetta-code.gnome-sort ;
+IN: rosetta-code.gnome-sort.tests
+
+{ V{ } } [ V{ } gnome-sort ] unit-test
+{ V{ 0 } } [ V{ 0 } gnome-sort ] unit-test
+{ V{ 0 1 2 3 4 5 } } [ V{ 0 1 2 3 4 5 } gnome-sort ] unit-test
+{ V{ 0 1 2 3 4 5 } } [ V{ 5 4 3 2 1 0 } gnome-sort ] unit-test
+{ V{ 0 1 2 3 4 5 } } [ V{ 2 4 5 1 3 0 } gnome-sort ] unit-test