aboutsummaryrefslogtreecommitdiff
path: root/js/tests/types.js
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-23 22:42:00 -0500
committerJoel Martin <github@martintribe.org>2014-04-23 22:42:00 -0500
commite6a1697802135bf29a1ed50074d9244653235e4b (patch)
tree09e42c10cf02ac8ac4dcb1b49d45568c838058bc /js/tests/types.js
parent37b97ee7a874b4b881733477e4633914f41d1106 (diff)
downloadmal-e6a1697802135bf29a1ed50074d9244653235e4b.tar.gz
mal-e6a1697802135bf29a1ed50074d9244653235e4b.zip
JS: Fix internal tests.
Thanks: Wes Brown <wesbrown18@gmail.com>.
Diffstat (limited to 'js/tests/types.js')
-rw-r--r--js/tests/types.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/js/tests/types.js b/js/tests/types.js
index 71b276f..d200cf7 100644
--- a/js/tests/types.js
+++ b/js/tests/types.js
@@ -1,15 +1,17 @@
common = require('./common.js');
var assert_eq = common.assert_eq;
var types = require('../types.js');
-var symbol = types.symbol,
- hash_map = types.ns['hash-map'],
- hash_map_Q = types.ns['map?'],
- assoc = types.ns['assoc'],
- dissoc = types.ns['dissoc'],
- get = types.ns['get'],
- contains_Q = types.ns['contains?'],
- count = types.ns['count'],
- equal_Q = types.ns['='];
+var core = require('../core.js');
+var env = require('../env.js');
+var symbol = types._symbol,
+ hash_map = core.ns['hash-map'],
+ hash_map_Q = core.ns['map?'],
+ assoc = core.ns['assoc'],
+ dissoc = core.ns['dissoc'],
+ get = core.ns['get'],
+ contains_Q = core.ns['contains?'],
+ count = core.ns['count'],
+ equal_Q = core.ns['='];
console.log("Testing hash_maps");
@@ -73,7 +75,7 @@ assert_eq(false, equal_Q(L10, L6));
console.log("Testing ENV (1 level)")
-env1 = new types.Env();
+env1 = new env.Env();
assert_eq('val_a',env1.set('a','val_a'));
assert_eq('val_b',env1.set('b','val_b'));
assert_eq('val_eq',env1.set('=','val_eq'));
@@ -82,7 +84,7 @@ assert_eq('val_b',env1.get('b'));
assert_eq('val_eq',env1.get('='));
console.log("Testing ENV (2 levels)");
-env2 = new types.Env(env1);
+env2 = new env.Env(env1);
assert_eq('val_b2',env2.set('b','val_b2'));
assert_eq('val_c',env2.set('c','val_c'));
assert_eq(env1,env2.find('a'));