mirror of
https://github.com/janet-lang/janet
synced 2026-09-13 21:01:21 +00:00
Change convention for naming modules and functions.
This commit is contained in:
+1
-1
@@ -19,4 +19,4 @@
|
||||
(defn end-suite []
|
||||
(print "\nTest suite " suite-num " finished.")
|
||||
(print num-tests-passed " of " num-tests-run " tests passed.\n")
|
||||
(if (not= num-tests-passed num-tests-run) (os-exit 1)))
|
||||
(if (not= num-tests-passed num-tests-run) (os.exit 1)))
|
||||
|
||||
+6
-6
@@ -151,7 +151,7 @@
|
||||
(def afiber-result (resume afiber "world!"))
|
||||
|
||||
(assert (= afiber-result "hello, world!") "fiber error result")
|
||||
(assert (= (fiber-status afiber) :error) "fiber error status")
|
||||
(assert (= (fiber.status afiber) :error) "fiber error status")
|
||||
|
||||
# yield tests
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
(assert (= 1 (resume t)) "initial transfer to new fiber")
|
||||
(assert (= 2 (resume t)) "second transfer to fiber")
|
||||
(assert (= 3 (resume t)) "return from fiber")
|
||||
(assert (= (fiber-status t) :dead) "finished fiber is dead")
|
||||
(assert (= (fiber.status t) :dead) "finished fiber is dead")
|
||||
|
||||
# Var arg tests
|
||||
|
||||
@@ -216,17 +216,17 @@
|
||||
(def xi (get xs i))
|
||||
(def yj (get ys j))
|
||||
(if (< xi yj)
|
||||
(do (array-push ret xi) (:= i (+ i 1)))
|
||||
(do (array-push ret yj) (:= j (+ j 1)))))
|
||||
(do (array.push ret xi) (:= i (+ i 1)))
|
||||
(do (array.push ret yj) (:= j (+ j 1)))))
|
||||
# Push rest of xs
|
||||
(while (< i xlen)
|
||||
(def xi (get xs i))
|
||||
(array-push ret xi)
|
||||
(array.push ret xi)
|
||||
(:= i (+ i 1)))
|
||||
# Push rest of ys
|
||||
(while (< j ylen)
|
||||
(def yj (get ys j))
|
||||
(array-push ret yj)
|
||||
(array.push ret yj)
|
||||
(:= j (+ j 1)))
|
||||
ret))
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
:childprop 456
|
||||
})
|
||||
|
||||
(setproto childtab roottab)
|
||||
(table.setproto childtab roottab)
|
||||
|
||||
(assert (= 123 (get roottab :parentprop)), "table get 1")
|
||||
(assert (= 123 (get childtab :parentprop)), "table get proto")
|
||||
|
||||
Reference in New Issue
Block a user