]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/retries/retries-tests.factor
factor: add newlines to .factor files
[factor.git] / basis / retries / retries-tests.factor
index 87092766d89d456009d1283651c05e6da6ec0e7d..0e96a1f0f143bdaad283c3f50495e57aa35a3615 100644 (file)
@@ -6,66 +6,67 @@ IN: retries.tests
 ! try every value in a sequence with no sleeps
 [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 } <immediate> retries
+    <immediate> { 1 } retries
 ] [ retries-failed? ] must-fail-with
 
 { 2 } [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 2 } <immediate> retries
+    <immediate> { 1 2 } retries
 ] unit-test
 
 ! try every value in a sequence with a random sleep
 [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 } 10 20 <random-wait> retries
+    10 20 <random-wait> { 1 } retries
 ] [ retries-failed? ] must-fail-with
 
 { 2 } [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 2 } 10 20 <random-wait> retries
+    10 20 <random-wait> { 1 2 } retries
 ] unit-test
 
 ! try every value in a sequence with an exponentially increasing sleep
 [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 } 1.1 100 <exponential-wait> retries
+    1.1 100 <exponential-wait> { 1 } retries
 ] [ retries-failed? ] must-fail-with
 
 { 2 } [
     [ dup 2 = [ "not 2!" throw ] unless ]
-    { 1 2 } 1.1 100 <exponential-wait> retries
+    1.1 100 <exponential-wait> { 1 2 } retries
 ] unit-test
 
 
 ! try n times with no sleeps
 [
     [ 2 = [ "not 2!" throw ] unless ]
-    2 <immediate> retries
+    <immediate> 2 retries
 ] [ retries-failed? ] must-fail-with
 
 { } [
     [ 2 = [ "not 2!" throw ] unless ]
-    3 <immediate> retries
+    <immediate> 3 retries
 ] unit-test
 
 ! try n times with a random sleep
 [
     [ 2 = [ "not 2!" throw ] unless ]
-    2 10 20 <random-wait> retries
+    10 20 <random-wait> 2 retries
 ] [ retries-failed? ] must-fail-with
 
 { } [
     [ 2 = [ "not 2!" throw ] unless ]
-    3 10 20 <random-wait> retries
+    10 20 <random-wait> 3 retries
 ] unit-test
 
 ! try n times with an exponentially increasing sleep
 [
     [ 2 = [ "not 2!" throw ] unless ]
-    2 1.1 100 <exponential-wait> retries
+    1.1 100 <exponential-wait> 2 retries
 ] [ retries-failed? ] must-fail-with
 
 { } [
     [ 2 = [ "not 2!" throw ] unless ]
-    3 1.1 100 <exponential-wait> retries
-] unit-test
\ No newline at end of file
+     1.1 100 <exponential-wait> 3 retries
+] unit-test
+