nasser / magic

Morgan And Grand Iron Clojure
http://nas.sr/magic/
365 stars 18 forks source link

Failing tests #198

Closed nasser closed 4 years ago

nasser commented 4 years ago

Some tests are failing. Not clear if these are expected failures or regressions.

user> (with-redefs [clojure.core/eval magic.api/eval]
.....       (apply clojure.test/run-tests files/test-namespaces))
Testing clojure.test-clojure.control

ERROR in (test-case) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_control$<fn>__22:invoke (): IL_966f: callvirt  0x0a000008

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.def

ERROR in (dynamic-redefinition) (/build/mono/src/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:409)
classes are never cached, even if their bodies are the same
expected: (= :b (eval (quote (do (defmacro my-macro [] :a) (defn do-macro [] (my-macro)) (defmacro my-macro [] :b) (defn do-macro [] (my-macro)) (do-macro)))))
  actual: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 at System.Reflection.RuntimeMethodInfo.Invoke (/build/mono/src/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:409)
    System.Reflection.MethodBase.Invoke (/build/mono/src/mono/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53)
    . (:0)
    magic$api$eval__11215.__interop_Invoke11217 (:0)
    magic$api$eval__11215.invokeStatic (:0)
    magic$api$eval__11215.invoke (:0)
    <magic>clojure_test-clojure_def$<fn>__0.invoke (:0)
Caused by: clojure.lang.ArityException: Wrong number of args (0) passed to: <magic>user/my-macro--1
 at clojure.lang.AFn.invoke (:0)
    <magic>user$do-macro__1.invoke (:0)
    <magic-eval>_0.eval (:0)
    . (:0)
    System.Reflection.RuntimeMethodInfo.Invoke (/build/mono/src/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395)

Testing clojure.test-clojure.main

ERROR in (eval-opt) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_main$<fn>__0:invoke (): IL_010d: callvirt  0x0a00000a

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.metadata

ERROR in (defn-primitive-args) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_metadata$<fn>__14:invoke (): IL_0461: callvirt  0x0a00000d

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.printer

ERROR in (print-length-empty-vec) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_printer$<fn>__2:invoke (): IL_0098: callvirt  0x0a000010

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (print-dup-readable) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_printer$<fn>__7:invoke (): IL_00a8: callvirt  0x0a000007

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (print-ns-maps) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_printer$<fn>__10:invoke (): IL_00b2: callvirt  0x0a000010

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (print-length-empty-seq) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_printer$<fn>__0:invoke (): IL_0098: callvirt  0x0a000010

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (print-dup-expected) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_printer$<fn>__6:invoke (): IL_0096: callvirt  0x0a000010

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.protocols

ERROR in (defrecord-printing) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_protocols$<fn>__21:invoke (): IL_0946: callvirt  0x0a000008

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.repl

ERROR in (test-dir) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_repl$<fn>__3:invoke (): IL_205e: callvirt  0x0a000011

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (test-doc) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_repl$<fn>__2:invoke (): IL_014a: callvirt  0x0a000007

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.special

ERROR in (typehints-retained-destructuring) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_special$<fn>__15:invoke (): IL_0453: callvirt  0x0a000016

 at <magic>clojure_test$test-var__0.invoke (:0)

Testing clojure.test-clojure.vars

ERROR in (test-with-precision) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_vars$<fn>__3:invoke (): IL_00ad: callvirt  0x0a000013

 at <magic>clojure_test$test-var__0.invoke (:0)

ERROR in (test-settable-math-context) (:0)
Uncaught exception, not in assertion.
expected: nil
  actual: System.InvalidProgramException: Invalid IL code in <magic>clojure_test-clojure_vars$<fn>__4:invoke (): IL_0230: callvirt  0x0a000013

 at <magic>clojure_test$test-var__0.invoke (:0)
Ran 399 tests containing 7777 assertions.
0 failures, 15 errors.
{:test 399, :pass 7762, :fail 0, :error 15, :type :summary}
nasser commented 4 years ago

9a92adbe63cc0f7b597d4051062970deed5afded addresses the try-catch failure, removing from the description to reflect.