Permalink
Browse files

Remove examples and test runner.

  • Loading branch information...
cmeiklejohn committed Mar 13, 2013
1 parent 1ac5bb6 commit 80a5d6451df1773ddf0785bb5fdccf802409da7e
View
@@ -15,23 +15,10 @@
:hooks [leiningen.cljsbuild]
:cljsbuild
{:builds
- [{:source-paths ["test/integration"],
- :id "test",
- :compiler
- {:pretty-print true,
- :output-to "resources/private/integration.js",
- :optimizations :whitespace}}
- {:source-paths ["src/cljs"],
+ [{:source-paths ["src/cljs"],
:id "core",
:compiler
{:pretty-print true,
:output-to "resources/private/core.js",
:optimizations :whitespace}}
- {:source-paths ["src/cljs"],
- :id "examples",
- :compiler
- {:pretty-print true,
- :output-to "resources/public/examples.js",
- :optimizations :whitespace}}],
- :test-commands
- {"integration" ["phantomjs" "test/integration/runner.coffee"]}})
+ ]})
No changes.
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html lang='en'>
- <head>
- <meta charset='utf-8' />
- <title>Autosave Example</title>
- <script type="text/javascript">var CLOSURE_NO_DEPS = true;</script>
-
- <style type="text/css">
- .green {
- color: green;
- }
- </style>
- </head>
- <body>
- <p>This document will autosave every 10 seconds, or when save is clicked.</p>
-
- <p>This is the editor.</p>
-
- <textarea id="live-content" cols="70" rows="10"></textarea><br />
-
- <p>
- <button id="save-button">Save</button>
- </p>
-
- <script type="text/javascript" src="../../resources/public/examples.js"></script>
- <script type="text/javascript">shafty.examples.autosave.main();</script>
- </body>
-</html>
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html lang='en'>
- <head>
- <meta charset='utf-8' />
- <title>Elapsed Time Example</title>
- <script type="text/javascript">var CLOSURE_NO_DEPS = true;</script>
- </head>
- <body>
- <button id="reset-button">Reset</button>
-
- <p>Elapsed time since reset or load:
- <span id="elapsed"></span></p>
-
- <script type="text/javascript" src="../../resources/public/examples.js"></script>
- <script type="text/javascript">shafty.examples.elapsed.main();</script>
- </body>
-</html>
@@ -1,92 +0,0 @@
-;; Copyright (c) Christopher Meiklejohn. All rights reserved.
-;;
-;; The use and distribution terms for this software are covered by the
-;; Eclipse Public License 1.0 which can be found in the file
-;; LICENSE.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 test.integration.integration
- (:use [shafty.core :only [lift! event merge! map! filter! propagate!
- send! hold!]]))
-
-(.log js/console "Starting Tests")
-
-; Generate a series of events, and verify that after all changes have
-; propgated a filtered event only contains the correct values.
-;
- (let [e1 (event [] (fn [me x y a b] (propagate! me b)))
- e2 (filter! e1 (fn [x] (= 1 x)))
- e3 (map! e2 (fn [x] (assert (= 1 x))))]
- (send! e1 2)
- (send! e1 1)
- (send! e1 1))
-
-;; Generate a series of events, and verify that after all changes have
-;; propgated a mapped event only contains the correct values.
-;;
-(let [e1 (event [] (fn [me x y a b] (propagate! me b)))
- e2 (map! e1 (fn [x] (identity 3)))
- e3 (map! e2 (fn [x] (assert (= 3 x))))]
- (send! e1 2)
- (send! e1 1)
- (send! e1 1))
-
-;; Generate a series of events, hold to a behaviour, and assert that the
-;; behaviour deref's to the correct value.
-;;
-(let [e1 (event [] (fn [me x y a b] (propagate! me b)))
- e2 (map! e1 (fn [x] (identity 3)))
- b1 (hold! e2 nil)]
- (send! e1 2)
- (send! e1 1)
- (send! e1 1)
- (assert (= 3 @b1)))
-
-;; Generate multiple event streams, merge into one, hold into a
-;; behaviour and verify that all events are received.
-;;
-(let [e1 (event [] (fn [me x y a b] (propagate! me b)))
- e2 (event [] (fn [me x y a b] (propagate! me b)))
- e3 (merge! e1 e2)
- b1 (hold! e3 0)]
- (send! e1 1)
- (assert (= 1 @b1))
-
- (send! e2 2)
- (assert (= 2 @b1))
-
- (send! e1 3)
- (assert (= 3 @b1))
-
- (send! e2 4)
- (assert (= 4 @b1)))
-
-;; Generate multiple event streams, merge into one, hold into a
-;; behaviour, then lift, and verify that all events are received.
-;;
-(let [e1 (event [] (fn [me x y a b] (propagate! me b)))
- e2 (event [] (fn [me x y a b] (propagate! me b)))
- e3 (merge! e1 e2)
- b1 (hold! e3 0)
- b2 (lift! b1 (fn [x] (* 2 x)))
- b3 (lift! b2 (fn [x] (* 2 x)))]
- (send! e1 1)
- (assert (= 1 @b1))
- (assert (= 2 @b2))
-
- (send! e2 2)
- (assert (= 2 @b1))
- (assert (= 4 @b2))
-
- (send! e1 3)
- (assert (= 3 @b1))
- (assert (= 6 @b2))
-
- (send! e2 4)
- (assert (= 4 @b1))
- (assert (= 8 @b2))
- (assert (= 16 @b3)))
-
-(.log js/console "Ending Tests")
@@ -1,9 +0,0 @@
-# Test runner for use with PhantomJS
-page = new WebPage()
-page.onConsoleMessage = (msg) -> console.log msg
-
-page.onLoadFinished = ->
- page.injectJs "resources/private/integration.js"
- phantom.exit()
-
-page.open "about:blank"
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html lang='en'>
- <head>
- <meta charset='utf-8' />
- <title>Test</title>
- <script type="text/javascript">var CLOSURE_NO_DEPS = true;</script>
- </head>
- <body>
- <script type="text/javascript" src="../../resources/private/integration.js"></script>
- </body>
-</html>

0 comments on commit 80a5d64

Please sign in to comment.