Skip to content

Instantly share code, notes, and snippets.

@sgrove
Created July 29, 2013 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgrove/6105574 to your computer and use it in GitHub Desktop.
Save sgrove/6105574 to your computer and use it in GitHub Desktop.
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(""));
};
(ns foo.ns-shadow-test)
(defn bar [] 1)
(defn quux [foo]
(+ (foo.ns-shadow-test/bar) foo))
(defn test-shadow []
(assert (= (quux 2) 3)))
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