aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantisek Sodomka <fsodomka@gmail.com>2009-03-19 17:53:47 +0000
committerFrantisek Sodomka <fsodomka@gmail.com>2009-03-19 17:53:47 +0000
commit389da9ef197af2e2e952d32cccf9a9d853f38660 (patch)
tree60c1d43842c6ccb48e52ca8443c39ec3576a19e1
parent8964e1902ae5254f2f9bfd988bab3418087dbfaa (diff)
test-clojure: preparation for new tests
-rw-r--r--src/clojure/contrib/load_all.clj11
-rw-r--r--src/clojure/contrib/test_clojure.clj11
-rw-r--r--src/clojure/contrib/test_clojure/agents.clj12
-rw-r--r--src/clojure/contrib/test_clojure/atoms.clj18
-rw-r--r--src/clojure/contrib/test_clojure/control.clj31
-rw-r--r--src/clojure/contrib/test_clojure/java_interop.clj46
-rw-r--r--src/clojure/contrib/test_clojure/multimethods.clj25
-rw-r--r--src/clojure/contrib/test_clojure/ns_libs.clj26
-rw-r--r--src/clojure/contrib/test_clojure/numbers.clj5
-rw-r--r--src/clojure/contrib/test_clojure/other_functions.clj30
-rw-r--r--src/clojure/contrib/test_clojure/refs.clj19
-rw-r--r--src/clojure/contrib/test_clojure/sequences.clj5
-rw-r--r--src/clojure/contrib/test_clojure/special.clj33
-rw-r--r--src/clojure/contrib/test_clojure/vars.clj27
14 files changed, 297 insertions, 2 deletions
diff --git a/src/clojure/contrib/load_all.clj b/src/clojure/contrib/load_all.clj
index ea1f2f1d..6822df01 100644
--- a/src/clojure/contrib/load_all.clj
+++ b/src/clojure/contrib/load_all.clj
@@ -51,7 +51,7 @@ generic.functor
generic.math-functions
import-static
javadoc.browse
-javadoc
+;; javadoc - moved to repl-utils
javalog
json.read
json.write
@@ -79,16 +79,25 @@ template
test-is
test-is.tests
test-clojure.agents
+test-clojure.atoms
+test-clojure.control
test-clojure.data-structures
test-clojure.evaluation
test-clojure.for
+test-clojure.java-interop
test-clojure.logic
test-clojure.main
+test-clojure.multimethods
+test-clojure.ns-libs
test-clojure.numbers
+test-clojure.other-functions
test-clojure.predicates
test-clojure.printer
test-clojure.reader
+test-clojure.refs
test-clojure.sequences
+test-clojure.special
+test-clojure.vars
test-contrib.shell-out
test-contrib.str-utils
trace
diff --git a/src/clojure/contrib/test_clojure.clj b/src/clojure/contrib/test_clojure.clj
index 65a97671..5b30b2f2 100644
--- a/src/clojure/contrib/test_clojure.clj
+++ b/src/clojure/contrib/test_clojure.clj
@@ -21,13 +21,22 @@
[:reader
:printer
:evaluation
- :predicates
+ :special
+ :ns-libs
:logic
+ :predicates
+ :control
:data-structures
:numbers
:sequences
:for
+ :multimethods
+ :other-functions
+ :vars
+ :refs
:agents
+ :atoms
+ :java-interop
:main
])
diff --git a/src/clojure/contrib/test_clojure/agents.clj b/src/clojure/contrib/test_clojure/agents.clj
index 30951fc0..34dfb2a1 100644
--- a/src/clojure/contrib/test_clojure/agents.clj
+++ b/src/clojure/contrib/test_clojure/agents.clj
@@ -27,3 +27,15 @@
(send agt nil?)
(await agt)
(is (true? @agt))))
+
+
+; http://clojure.org/agents
+
+; agent
+; deref, @-reader-macro, agent-errors
+; send send-off clear-agent-errors
+; await await-for
+; set-validator get-validator
+; add-watch remove-watch
+; shutdown-agents
+
diff --git a/src/clojure/contrib/test_clojure/atoms.clj b/src/clojure/contrib/test_clojure/atoms.clj
new file mode 100644
index 00000000..0b0dbd91
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/atoms.clj
@@ -0,0 +1,18 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.atoms
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/atoms
+
+; atom
+; deref, @-reader-macro
+; swap! reset!
+; compare-and-set!
+
diff --git a/src/clojure/contrib/test_clojure/control.clj b/src/clojure/contrib/test_clojure/control.clj
new file mode 100644
index 00000000..483250d7
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/control.clj
@@ -0,0 +1,31 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+;;
+;; Test "flow control" constructs.
+;;
+
+(ns clojure.contrib.test-clojure.control
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/special_forms
+; http://clojure.org/macros
+
+; do
+; loop/recur
+; throw, try
+
+; [if (logic.clj)], if-not, if-let
+; when, when-not, when-let, when-first
+; cond, condp
+
+; [for, doseq (for.clj)]
+
+; dotimes, while
+
+; locking, monitor-enter, monitor-exit
+
diff --git a/src/clojure/contrib/test_clojure/java_interop.clj b/src/clojure/contrib/test_clojure/java_interop.clj
new file mode 100644
index 00000000..5384dcc8
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/java_interop.clj
@@ -0,0 +1,46 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.java-interop
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/java_interop
+; http://clojure.org/compilation
+
+; Member access
+; . ..
+; doto
+
+; new
+
+; instance?
+
+; set!
+
+; memfn
+
+; bean
+; proxy, proxy-super
+; gen-class, gen-interface
+; compile
+
+; bases, supers
+
+; Arrays: alength aget aset make-array to-array into-array to-array-2d aclone
+; float-array, int-array, etc
+; amap, areduce
+
+; Type Hints, *warn-on-reflection*
+; #^ints, #^floats, #^longs, #^doubles
+
+; Coercions: int, long, float, double, char, boolean, short, byte
+; num
+; ints/longs/floats/doubles
+
+; Simple XML Support: xml/parse
+
diff --git a/src/clojure/contrib/test_clojure/multimethods.clj b/src/clojure/contrib/test_clojure/multimethods.clj
new file mode 100644
index 00000000..b273a0bd
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/multimethods.clj
@@ -0,0 +1,25 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.multimethods
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/multimethods
+
+; defmulti
+; defmethod
+; remove-method
+; prefer-method
+; methods
+; prefers
+
+; derive, [underive]
+; isa?
+; parents, ancestors, descendants
+; make-hierarchy
+
diff --git a/src/clojure/contrib/test_clojure/ns_libs.clj b/src/clojure/contrib/test_clojure/ns_libs.clj
new file mode 100644
index 00000000..50822d46
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/ns_libs.clj
@@ -0,0 +1,26 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.ns-libs
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/namespaces
+
+; in-ns ns create-ns
+; alias import intern refer
+; all-ns find-ns
+; ns-name ns-aliases ns-imports ns-interns ns-map ns-publics ns-refers
+; resolve ns-resolve namespace
+; ns-unalias ns-unmap remove-ns
+
+
+; http://clojure.org/libs
+
+; require use
+; loaded-libs
+
diff --git a/src/clojure/contrib/test_clojure/numbers.clj b/src/clojure/contrib/test_clojure/numbers.clj
index 0f65ed29..82450641 100644
--- a/src/clojure/contrib/test_clojure/numbers.clj
+++ b/src/clojure/contrib/test_clojure/numbers.clj
@@ -14,6 +14,11 @@
(:use clojure.contrib.test-is))
+; TODO:
+; ==
+; and more...
+
+
;; *** Types ***
(deftest Coerced-Byte
diff --git a/src/clojure/contrib/test_clojure/other_functions.clj b/src/clojure/contrib/test_clojure/other_functions.clj
new file mode 100644
index 00000000..6175891c
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/other_functions.clj
@@ -0,0 +1,30 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.other-functions
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/other_functions
+
+; [= not= (tests in data_structures.clj and elsewhere)]
+
+; identity
+; time assert comment doc
+
+; partial
+; comp
+; complement
+; constantly
+
+; Printing
+; pr prn print println newline
+; pr-str prn-str print-str println-str [with-out-str (vars.clj)]
+
+; Regex Support
+; re-matcher re-find re-matches re-groups re-seq
+
diff --git a/src/clojure/contrib/test_clojure/refs.clj b/src/clojure/contrib/test_clojure/refs.clj
new file mode 100644
index 00000000..dcc43cc4
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/refs.clj
@@ -0,0 +1,19 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.refs
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/refs
+
+; ref
+; deref, @-reader-macro
+; dosync io!
+; ensure ref-set alter commute
+; set-validator get-validator
+
diff --git a/src/clojure/contrib/test_clojure/sequences.clj b/src/clojure/contrib/test_clojure/sequences.clj
index 995a1bc9..41d4a9e3 100644
--- a/src/clojure/contrib/test_clojure/sequences.clj
+++ b/src/clojure/contrib/test_clojure/sequences.clj
@@ -18,6 +18,11 @@
;; *** Tests ***
+; TODO:
+; apply, map, reduce, filter, remove
+; and more...
+
+
(deftest test-equality
; lazy sequences
(are (= _1 _2)
diff --git a/src/clojure/contrib/test_clojure/special.clj b/src/clojure/contrib/test_clojure/special.clj
new file mode 100644
index 00000000..81138573
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/special.clj
@@ -0,0 +1,33 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+;;
+;; Test special forms, macros and metadata
+;;
+
+(ns clojure.contrib.test-clojure.special
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/special_forms
+
+; let
+; quote
+; var
+; fn
+
+
+; http://clojure.org/macros
+
+; ->
+; defmacro definline macroexpand-1 macroexpand
+
+
+; http://clojure.org/metadata
+
+; meta
+; with-meta
+
diff --git a/src/clojure/contrib/test_clojure/vars.clj b/src/clojure/contrib/test_clojure/vars.clj
new file mode 100644
index 00000000..5b76cc43
--- /dev/null
+++ b/src/clojure/contrib/test_clojure/vars.clj
@@ -0,0 +1,27 @@
+;; Copyright (c) Frantisek Sodomka. All rights reserved. The use and
+;; distribution terms for this software are covered by the Eclipse Public
+;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
+;; be found in the file epl-v10.html at the root of this distribution. By
+;; using this software in any fashion, you are agreeing to be bound by the
+;; terms of this license. You must not remove this notice, or any other,
+;; from this software.
+
+(ns clojure.contrib.test-clojure.vars
+ (:use clojure.contrib.test-is))
+
+; http://clojure.org/vars
+
+; def
+; defn defn- defonce
+
+; declare intern binding find-var var
+
+; with-local-vars var-get var-set alter-var-root [var? (predicates.clj)]
+; with-in-str with-out-str
+; with-open
+; with-precision
+
+; set-validator get-validator
+
+; doc find-doc test
+