aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/aedifex/command/version.lux50
-rw-r--r--stdlib/source/test/aedifex/repository.lux34
-rw-r--r--stdlib/source/test/lux.lux10
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux14
-rw-r--r--stdlib/source/test/lux/data/collection/stream.lux12
-rw-r--r--stdlib/source/test/lux/data/format/binary.lux10
-rw-r--r--stdlib/source/test/lux/data/text/format.lux8
-rw-r--r--stdlib/source/test/lux/extension.lux44
-rw-r--r--stdlib/source/test/lux/tool/compiler/meta/cache/module.lux46
9 files changed, 113 insertions, 115 deletions
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index bb92fadfb..96b8cdf3b 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -29,32 +29,32 @@
(exception: .public console_is_closed!)
-(implementation: mock
+(def: mock
(Mock [Bit Text])
-
- (def: (on_read [open? state])
- (if open?
- (try.of_maybe
- (do maybe.monad
- [head (text.char 0 state)
- [_ tail] (text.split_at 1 state)]
- (in [[open? tail] head])))
- (exception.except ..console_is_closed! [])))
- (def: (on_read_line [open? state])
- (if open?
- (try.of_maybe
- (do maybe.monad
- [[output state] (text.split_by text.new_line state)]
- (in [[open? state] output])))
- (exception.except ..console_is_closed! [])))
- (def: (on_write input [open? state])
- (if open?
- {try.#Success [open? (format state input)]}
- (exception.except ..console_is_closed! [])))
- (def: (on_close [open? buffer])
- (if open?
- {try.#Success [false buffer]}
- (exception.except ..console_is_closed! []))))
+ (implementation
+ (def: (on_read [open? state])
+ (if open?
+ (try.of_maybe
+ (do maybe.monad
+ [head (text.char 0 state)
+ [_ tail] (text.split_at 1 state)]
+ (in [[open? tail] head])))
+ (exception.except ..console_is_closed! [])))
+ (def: (on_read_line [open? state])
+ (if open?
+ (try.of_maybe
+ (do maybe.monad
+ [[output state] (text.split_by text.new_line state)]
+ (in [[open? state] output])))
+ (exception.except ..console_is_closed! [])))
+ (def: (on_write input [open? state])
+ (if open?
+ {try.#Success [open? (format state input)]}
+ (exception.except ..console_is_closed! [])))
+ (def: (on_close [open? buffer])
+ (if open?
+ {try.#Success [false buffer]}
+ (exception.except ..console_is_closed! [])))))
(def: .public echo
(-> Text (Console Async))
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux
index 7766a492a..56a5c7b54 100644
--- a/stdlib/source/test/aedifex/repository.lux
+++ b/stdlib/source/test/aedifex/repository.lux
@@ -65,24 +65,24 @@
Version
"4.5.6-NO")
-(implementation: .public mock
+(def: .public mock
(/.Mock Store)
-
- (def: the_description
- "@")
- (def: (on_download uri state)
- (case (dictionary.value uri state)
- {.#Some content}
- (case (binary.size content)
- 0 (exception.except ..not_found [uri])
- _ {try.#Success [state content]})
-
- {.#None}
- (exception.except ..not_found [uri])))
- (def: (on_upload uri content state)
- (if (dictionary.key? state uri)
- (exception.except ..cannot_upload [uri])
- {try.#Success (dictionary.has uri content state)})))
+ (implementation
+ (def: the_description
+ "@")
+ (def: (on_download uri state)
+ (case (dictionary.value uri state)
+ {.#Some content}
+ (case (binary.size content)
+ 0 (exception.except ..not_found [uri])
+ _ {try.#Success [state content]})
+
+ {.#None}
+ (exception.except ..not_found [uri])))
+ (def: (on_upload uri content state)
+ (if (dictionary.key? state uri)
+ (exception.except ..cannot_upload [uri])
+ {try.#Success (dictionary.has uri content state)}))))
(def: .public test
Test
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 0d393c2c2..0d282e16f 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -195,11 +195,11 @@
(is (-> Any a)
return)))
-(/.implementation: (global_returner value)
+(def: (global_returner value)
(All (_ a) (-> a (Returner a)))
-
- (def: (return _)
- value))
+ (/.implementation
+ (def: (return _)
+ value)))
(def: static_return 123)
@@ -215,8 +215,6 @@
expected)))]]
(_.for [/.Interface]
(all _.and
- (_.coverage [/.implementation:]
- (n.= expected (at (global_returner expected) return [])))
(_.coverage [/.implementation]
(n.= expected (at local_returner return [])))
(_.coverage [/.open:]
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index 7debf57b5..2905430dc 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -75,14 +75,14 @@
(Random Symbol)
(random.and ..random_text ..random_text))
-(implementation: location_equivalence
+(def: location_equivalence
(Equivalence Location)
-
- (def: (= [expected_module expected_line expected_column]
- [sample_module sample_line sample_column])
- (and (text#= expected_module sample_module)
- (n.= expected_line sample_line)
- (n.= expected_column sample_column))))
+ (implementation
+ (def: (= [expected_module expected_line expected_column]
+ [sample_module sample_line sample_column])
+ (and (text#= expected_module sample_module)
+ (n.= expected_line sample_line)
+ (n.= expected_column sample_column)))))
(def: random_location
(Random Location)
diff --git a/stdlib/source/test/lux/data/collection/stream.lux b/stdlib/source/test/lux/data/collection/stream.lux
index 174cb9041..661807915 100644
--- a/stdlib/source/test/lux/data/collection/stream.lux
+++ b/stdlib/source/test/lux/data/collection/stream.lux
@@ -21,13 +21,13 @@
[\\library
["[0]" /]])
-(implementation: (equivalence super)
+(def: (equivalence super)
(All (_ a) (-> (Equivalence a) (Equivalence (/.Stream a))))
-
- (def: (= reference subject)
- (at (list.equivalence super) =
- (/.first 100 reference)
- (/.first 100 subject))))
+ (implementation
+ (def: (= reference subject)
+ (at (list.equivalence super) =
+ (/.first 100 reference)
+ (/.first 100 subject)))))
(def: (iterations step)
(All (_ a)
diff --git a/stdlib/source/test/lux/data/format/binary.lux b/stdlib/source/test/lux/data/format/binary.lux
index 4fa969c57..f20117690 100644
--- a/stdlib/source/test/lux/data/format/binary.lux
+++ b/stdlib/source/test/lux/data/format/binary.lux
@@ -14,12 +14,12 @@
[\\library
["[0]" /]])
-(implementation: equivalence
+(def: equivalence
(Equivalence /.Specification)
-
- (def: (= reference subject)
- (binary#= (/.instance reference)
- (/.instance subject))))
+ (implementation
+ (def: (= reference subject)
+ (binary#= (/.instance reference)
+ (/.instance subject)))))
(def: random
(Random /.Specification)
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index 20c8ea453..f8669cb3e 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -53,11 +53,11 @@
[\\library
["[0]" /]])
-(implementation: (equivalence example)
+(def: (equivalence example)
(All (_ a) (-> a (Equivalence (/.Format a))))
-
- (def: (= reference subject)
- (text#= (reference example) (subject example))))
+ (implementation
+ (def: (= reference subject)
+ (text#= (reference example) (subject example)))))
(def: random_contravariant
(Random (Ex (_ a) [(/.Format a)
diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux
index dd2835166..0f0ae3764 100644
--- a/stdlib/source/test/lux/extension.lux
+++ b/stdlib/source/test/lux/extension.lux
@@ -60,7 +60,7 @@
(~~ (.these))))]]]]]]
["_" test (.only Test)]]]
[\\library
- ["[0]" / (.only analysis: synthesis: generation: directive:)]])))
+ ["[0]" / (.only analysis synthesis generation directive)]])))
(def: dummy_generation "dummy generation")
@@ -69,10 +69,10 @@
Text
(`` (%.symbol (symbol (~~ (template.symbol [.._ <name>]))))))]
- [analysis]
- [synthesis]
- [generation]
- [directive]
+ [my_analysis]
+ [my_synthesis]
+ [my_generation]
+ [my_directive]
)
... Generation
@@ -82,48 +82,48 @@
(these
(for @.python
... TODO: Remove this hack once Jython is no longer being used as the Python interpreter.
- (analysis: ("dummy dum dum" self phase archive [])
+ (analysis ("dummy dum dum" self phase archive [])
(undefined))
(these))
... Analysis
- (analysis: (..analysis self phase archive [pass_through <code>.any])
+ (analysis (..my_analysis self phase archive [pass_through <code>.any])
(phase archive pass_through))
... Synthesis
- (analysis: (..synthesis self phase archive [parameters (<>.some <code>.any)])
+ (analysis (..my_synthesis self phase archive [parameters (<>.some <code>.any)])
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
(at ! each (|>> {analysis.#Extension self})))))
- (synthesis: (..synthesis self phase archive [pass_through <analysis>.any])
+ (synthesis (..my_synthesis self phase archive [pass_through <analysis>.any])
(phase archive pass_through))
... Generation
- (analysis: (..generation self phase archive [parameters (<>.some <code>.any)])
+ (analysis (..my_generation self phase archive [parameters (<>.some <code>.any)])
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
(at ! each (|>> {analysis.#Extension self})))))
- (synthesis: (..generation self phase archive [parameters (<>.some <analysis>.any)])
+ (synthesis (..my_generation self phase archive [parameters (<>.some <analysis>.any)])
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
(at ! each (|>> {synthesis.#Extension self})))))
- (generation: (..generation self phase archive [pass_through <synthesis>.any])
+ (generation (..my_generation self phase archive [pass_through <synthesis>.any])
(phase archive pass_through))
- (analysis: (..dummy_generation self phase archive [])
+ (analysis (..dummy_generation self phase archive [])
(at phase.monad in {analysis.#Extension self (list)}))
- (synthesis: (..dummy_generation self phase archive [])
+ (synthesis (..dummy_generation self phase archive [])
(at phase.monad in {synthesis.#Extension self (list)}))
- (generation: (..dummy_generation self phase archive [])
+ (generation (..dummy_generation self phase archive [])
(at phase.monad in
(for @.jvm (jvm.string self)
@.js (js.string self)
@@ -134,7 +134,7 @@
@.scheme (scheme.string self))))
... Directive
- (directive: (..directive self phase archive [expression <code>.any])
+ (directive (..my_directive self phase archive [expression <code>.any])
(do [! phase.monad]
[analysis_phase directive.analysis
expressionA (<| directive.lifted_analysis
@@ -178,7 +178,7 @@
(generation.log! commentary))))]
(in directive.no_requirements)))
- (`` ((~~ (static ..directive)) (n.* 2 3)))
+ (`` ((~~ (static ..my_directive)) (n.* 2 3)))
))
(def: .public test
@@ -193,14 +193,14 @@
(n.= expected
(`` ((~~ (static <extension>)) expected)))))]
- [/.analysis: ..analysis]
- [/.synthesis: ..synthesis]))
- (_.coverage [/.generation:]
+ [/.analysis ..my_analysis]
+ [/.synthesis ..my_synthesis]))
+ (_.coverage [/.generation]
(for @.old false
(and (n.= expected
- (`` ((~~ (static ..generation)) expected)))
+ (`` ((~~ (static ..my_generation)) expected)))
(text#= ..dummy_generation
(`` ((~~ (static ..dummy_generation))))))))
- (_.coverage [/.directive:]
+ (_.coverage [/.directive]
true)
)))))
diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
index 30dd30486..9508037ea 100644
--- a/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
+++ b/stdlib/source/test/lux/tool/compiler/meta/cache/module.lux
@@ -18,32 +18,32 @@
["$[0]" ///
["[1][0]" context]])
-(`` (implementation: (bad it)
+(`` (def: (bad it)
(-> (file.System Async) (file.System Async))
+ (implementation
+ (~~ (with_template [<name>]
+ [(def: <name>
+ (at it <name>))]
- (~~ (with_template [<name>]
- [(def: <name>
- (at it <name>))]
+ [separator]
+ [file?]
+ [directory?]
+ [modify]
+ [write]
+ [append]
+ [move]
+ [directory_files]
+ [sub_directories]
+ [file_size]
+ [last_modified]
+ [can_execute?]
+ [read]
+ [delete]
+ ))
- [separator]
- [file?]
- [directory?]
- [modify]
- [write]
- [append]
- [move]
- [directory_files]
- [sub_directories]
- [file_size]
- [last_modified]
- [can_execute?]
- [read]
- [delete]
- ))
-
- (def: (make_directory path)
- (async#in {try.#Failure ""}))
- ))
+ (def: (make_directory path)
+ (async#in {try.#Failure ""}))
+ )))
(def: .public test
Test