From ab1829d77c7d12af344af68d6c50d391f1126640 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 5 Jan 2023 02:33:52 -0400 Subject: Compilation of simple literals in C++. --- stdlib/source/specification/lux/world/console.lux | 60 ---------------------- .../source/specification/lux/world/environment.lux | 34 ------------ 2 files changed, 94 deletions(-) delete mode 100644 stdlib/source/specification/lux/world/console.lux delete mode 100644 stdlib/source/specification/lux/world/environment.lux (limited to 'stdlib/source/specification') diff --git a/stdlib/source/specification/lux/world/console.lux b/stdlib/source/specification/lux/world/console.lux deleted file mode 100644 index c941d4da7..000000000 --- a/stdlib/source/specification/lux/world/console.lux +++ /dev/null @@ -1,60 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - [monad (.only do)]] - [control - [io (.only IO)] - ["[0]" try] - [concurrency - ["[0]" async (.only Async)]]] - [data - ["[0]" text (.only) - ["%" \\format (.only format)]]] - [math - ["[0]" random]] - [test - ["_" property (.only Test)] - ["[0]" unit]]]] - [\\library - ["[0]" /]]) - -(def .public (spec console) - (-> (IO (/.Console Async)) Test) - (do random.monad - [message (random.alphabetic 10)] - (in (do async.monad - [console (async.future console) - ?write (of console write (format message text.new_line)) - ?read (of console read []) - ?read_line (of console read_line []) - ?close/good (of console close []) - ?close/bad (of console close []) - - .let [can_write! - (when ?write - {try.#Success _} - true - - _ - false) - - can_read! - (when [?read ?read_line] - [{try.#Success _} {try.#Success _}] - true - - _ - false) - - can_close! - (when [?close/good ?close/bad] - [{try.#Success _} {try.#Failure _}] - true - - _ - false)]] - (unit.coverage [/.Console] - (and can_write! - can_read! - can_close!)))))) diff --git a/stdlib/source/specification/lux/world/environment.lux b/stdlib/source/specification/lux/world/environment.lux deleted file mode 100644 index 1a586c554..000000000 --- a/stdlib/source/specification/lux/world/environment.lux +++ /dev/null @@ -1,34 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - [monad (.only do)]] - [control - ["[0]" try] - [concurrency - ["[0]" async (.only Async)]]] - [data - ["[0]" text] - [collection - ["[0]" dictionary] - ["[0]" list]]] - [math - ["[0]" random]] - [test - ["_" property (.only Test)] - ["[0]" unit]]]] - [\\library - ["[0]" /]]) - -(def .public (spec subject) - (-> (/.Environment Async) Test) - (do random.monad - [exit random.int] - (in (do [! async.monad] - [environment (/.environment ! subject)] - (unit.coverage [/.Environment] - (and (not (dictionary.empty? environment)) - (list.every? (|>> text.empty? not) - (dictionary.keys environment)) - (not (text.empty? (of subject home))) - (not (text.empty? (of subject directory))))))))) -- cgit v1.2.3