Created
July 29, 2013 16:26
-
-
Save sgrove/6105574 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foo = {ns_shadow_test:{}}; | |
foo.ns_shadow_test.bar = function() { | |
return 1 | |
}; | |
foo.ns_shadow_test.quux = function(a) { | |
return a.ns_shadow_test.bar.call(null) + a | |
}; | |
foo.ns_shadow_test.test_shadow = function() { | |
if(cljs.core._EQ_.call(null, foo.ns_shadow_test.quux.call(null, 2), 3)) { | |
return null | |
} | |
throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "\x3d", "\x3d", -1640531466, null), cljs.core.list(new cljs.core.Symbol(null, "quux", "quux", -1637048960, null), 2), 3)))].join("")); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns foo.ns-shadow-test) | |
(defn bar [] 1) | |
(defn quux [foo] | |
(+ (foo.ns-shadow-test/bar) foo)) | |
(defn test-shadow [] | |
(assert (= (quux 2) 3))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goog.provide('foo.ns_shadow_test'); | |
goog.require('cljs.core'); | |
foo.ns_shadow_test.bar = (function bar(){return 1; | |
}); | |
foo.ns_shadow_test.quux = (function quux(foo){return (foo.ns_shadow_test.bar.call(null) + foo); | |
}); | |
foo.ns_shadow_test.test_shadow = (function test_shadow(){if(cljs.core._EQ_.call(null,foo.ns_shadow_test.quux.call(null,2),3)) | |
{return null; | |
} else | |
{throw (new Error([cljs.core.str("Assert failed: "),cljs.core.str(cljs.core.pr_str.call(null,cljs.core.list(new cljs.core.Symbol(null,"=","=",-1640531466,null),cljs.core.list(new cljs.core.Symbol(null,"quux","quux",-1637048960,null),2),3)))].join(''))); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment