aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2018-07-31 18:36:18 -0400
committerEduardo Julian2018-07-31 18:36:18 -0400
commiteea58ee669f69fddf2cef9e1675c41959e2e0a55 (patch)
tree5424dab3ef26190958fe4371f3f50995025d31cf /new-luxc/test
parent748c868680683df1949f62aac274040ac5bf43da (diff)
Now implementing atom functionality in stdlib instead of the compiler.
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/host.jvm.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/translation/common.lux61
2 files changed, 0 insertions, 63 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
index dabef0e08..9d09216b8 100644
--- a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
@@ -3,8 +3,6 @@
[control
[monad (#+ do)]
pipe]
- [concurrency
- ["." atom]]
[data
["e" error]
["." product]
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux
index 9a2465ce3..5425be2ea 100644
--- a/new-luxc/test/test/luxc/lang/translation/common.lux
+++ b/new-luxc/test/test/luxc/lang/translation/common.lux
@@ -378,66 +378,6 @@
#0))))
)))
-(def: (atom-spec run)
- (-> Runner Test)
- (do r.Monad<Random>
- [pre r.nat
- post (|> r.nat (r.filter (|>> (n/= pre) not)))
- #let [preS (synthesis.i64 pre)
- postS (synthesis.i64 post)
- atomS (#synthesis.Extension "lux atom new" (list preS))]]
- ($_ seq
- (test "Can read atoms."
- (|> (run (#synthesis.Extension "lux atom read" (list atomS)))
- (case> (#e.Success valueV)
- (n/= pre (:coerce Nat valueV))
-
- (#e.Error error)
- (exec (log! error)
- #0))))
- (test "Can compare-and-swap atoms."
- (and (|> (run (synthesis.branch/let
- [preS 0
- (synthesis.branch/let
- [(#synthesis.Extension "lux atom new"
- (list (synthesis.variable/local 0)))
- 1
- (synthesis.tuple
- (list (#synthesis.Extension "lux atom compare-and-swap"
- (list (synthesis.variable/local 1)
- (synthesis.variable/local 0)
- postS))
- (#synthesis.Extension "lux atom read" (list (synthesis.variable/local 1)))))])]))
- (case> (#e.Success valueV)
- (let [[swapped? current-value] (:coerce [Bit Nat] valueV)]
- (and swapped?
- (n/= post current-value)))
-
- (#e.Error error)
- (exec (log! error)
- #0)))
- (|> (run (synthesis.branch/let
- [preS 0
- (synthesis.branch/let
- [(#synthesis.Extension "lux atom new"
- (list (synthesis.variable/local 0)))
- 1
- (synthesis.tuple
- (list (#synthesis.Extension "lux atom compare-and-swap"
- (list (synthesis.variable/local 1)
- postS
- postS))
- (#synthesis.Extension "lux atom read" (list (synthesis.variable/local 1)))))])]))
- (case> (#e.Success valueV)
- (let [[swapped? current-value] (:coerce [Bit Nat] valueV)]
- (and (not swapped?)
- (n/= pre current-value)))
-
- (#e.Error error)
- (exec (log! error)
- #0)))))
- )))
-
(def: (box-spec run)
(-> Runner Test)
(do r.Monad<Random>
@@ -513,7 +453,6 @@
(text-spec run)
(array-spec run)
(io-spec run)
- (atom-spec run)
(box-spec run)
(process-spec run)
))