         opt {:optimize-constants true}
         optmod {:optimize-constants true :elide-asserts false}]
     (with-redefs [util/*clojurescript-version* {:major 0 :minor 0 :qualifier 42}]
-      (e/with-compiler-env (e/default-compiler-env)
+      (env/with-compiler-env (env/default-compiler-env)
         (.setLastModified dst (- (.lastModified src) 100))
-        (is (c/requires-compilation? src dst opt))
-        (c/compile-file src dst opt)
-        (is (not (c/requires-compilation? src dst opt)))
-        (is (c/requires-compilation? src dst optmod))
-        (c/compile-file src dst optmod)
-        (is (not (c/requires-compilation? src dst optmod)))))))
+        (is (comp/requires-compilation? src dst opt))
+        (comp/compile-file src dst opt)
+        (is (not (comp/requires-compilation? src dst opt)))
+        (is (comp/requires-compilation? src dst optmod))
+        (comp/compile-file src dst optmod)
+        (is (not (comp/requires-compilation? src dst optmod)))))))
 
 (deftest fn-scope-munge
-  (is (= (c/munge
+  (is (= (comp/munge
            (get-in
-             (a/analyze ns-env
+             (ana/analyze aenv
                '(defn foo []
                   (fn bar [])))
              [:init :name]))
          'cljs$user$foo))
-  (is (= (c/munge
+  (is (= (comp/munge
            (get-in
-             (a/analyze ns-env
+             (ana/analyze aenv
                '(defn foo []
                   (fn bar [])))
              [:init :children 0 :children 0 :name]))
           'cljs$user$foo_$_bar))
-  (is (= (c/munge
+  (is (= (comp/munge
            (get-in
-             (a/analyze ns-env
+             (ana/analyze aenv
                '(fn []
                   (fn console [])))
              [:children 0 :children 0 :name]))


(deftest test-js-negative-infinity
  (= (with-out-str
       (c/emit
         (a/analyze (assoc ns-env :context :expr) 'js/-Infinity)))
     "-Infinity"))

(ns cljs.compiler-tests
  (:use clojure.test)
  (:require [cljs.analyzer :as ana]
            [cljs.compiler :as comp]
            [cljs.env :as env]
            [cljs.util :as util])
  (:import [java.io File]))

(def aenv (assoc-in (ana/empty-env) [:ns :name] 'cljs.user))
(def cenv (env/default-compiler-env))

(deftest should-recompile
  (let [src (File. "test/hello.cljs")
