Re: test-is reporting problem
S. Sierra, Here is a good test case. It would be nice if the Java interop form worked, without having to be wrapped in an anonymous function. user= (use 'clojure.contrib.test-is) nil user= (.startsWith abc a) true user= (is (.startsWith abc a)) java.lang.Exception: Unable to resolve symbol: .startsWith in this context (NO_SOURCE_FILE:3) user= (#(.startsWith % a) abc) true user= (is (#(.startsWith % a) abc)) true S. Halloway I was afraid that would happen. I'll fix it, probably tomorrow. -the other Stuart On Jan 15, 6:27 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The improved error reposting in test-is breaks some tests, e.g. from the book: (deftest test-lazy-index-of-any-with-match (is (with-out-str (is (zero? (index-of-any zzabyycdxx #{\z \a} Iterating overz\n) (is (with-out-str (is (= 3 (index-of-any zzabyycdxx #{\b \y} Iterating overz\nIterating over z\nIterating over a\n)) The problem is that it tries to take the value of with-out-str, not realizing that it is a macro. Should I (1) rewrite the test to not use a macro? (2) take a stab at fixing this in test-is? (3) get out of the way and let another Stuart handle it? :-) Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: test-is reporting problem
Hello, fellow Stuarts, and others, Fixed now, SVN rev. 377. I've temporarily abandoned the fancier error reporting I had for functional predicates. I'm going to try to restore that without breaking anything else. :) Peace, love, and happy testing, -Stuart Sierra On Jan 16, 7:54 am, Stuart Halloway stuart.hallo...@gmail.com wrote: S. Sierra, Here is a good test case. It would be nice if the Java interop form worked, without having to be wrapped in an anonymous function. user= (use 'clojure.contrib.test-is) nil user= (.startsWith abc a) true user= (is (.startsWith abc a)) java.lang.Exception: Unable to resolve symbol: .startsWith in this context (NO_SOURCE_FILE:3) user= (#(.startsWith % a) abc) true user= (is (#(.startsWith % a) abc)) true S. Halloway I was afraid that would happen. I'll fix it, probably tomorrow. -the other Stuart On Jan 15, 6:27 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The improved error reposting in test-is breaks some tests, e.g. from the book: (deftest test-lazy-index-of-any-with-match (is (with-out-str (is (zero? (index-of-any zzabyycdxx #{\z \a} Iterating overz\n) (is (with-out-str (is (= 3 (index-of-any zzabyycdxx #{\b \y} Iterating overz\nIterating over z\nIterating over a\n)) The problem is that it tries to take the value of with-out-str, not realizing that it is a macro. Should I (1) rewrite the test to not use a macro? (2) take a stab at fixing this in test-is? (3) get out of the way and let another Stuart handle it? :-) Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: test-is reporting problem
On Jan 16, 11:02 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Fixed now, SVN rev. 377. I've temporarily abandoned the fancier error reporting I had for functional predicates. I'm going to try to restore that without breaking anything else. :) Ok, I figured out how to do it. Now (rev. 380) you get nice error reports again: user (is (= Word (.toUpperCase word))) FAIL in (:1) expected: (= Word (.toUpperCase word)) actual: (not (= Word WORD)) -Stuart Sierra --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
test-is reporting problem
The improved error reposting in test-is breaks some tests, e.g. from the book: (deftest test-lazy-index-of-any-with-match (is (with-out-str (is (zero? (index-of-any zzabyycdxx #{\z \a} Iterating overz\n) (is (with-out-str (is (= 3 (index-of-any zzabyycdxx #{\b \y} Iterating overz\nIterating over z\nIterating over a\n)) The problem is that it tries to take the value of with-out-str, not realizing that it is a macro. Should I (1) rewrite the test to not use a macro? (2) take a stab at fixing this in test-is? (3) get out of the way and let another Stuart handle it? :-) Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: test-is reporting problem
I was afraid that would happen. I'll fix it, probably tomorrow. -the other Stuart On Jan 15, 6:27 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The improved error reposting in test-is breaks some tests, e.g. from the book: (deftest test-lazy-index-of-any-with-match (is (with-out-str (is (zero? (index-of-any zzabyycdxx #{\z \a} Iterating overz\n) (is (with-out-str (is (= 3 (index-of-any zzabyycdxx #{\b \y} Iterating overz\nIterating over z\nIterating over a\n)) The problem is that it tries to take the value of with-out-str, not realizing that it is a macro. Should I (1) rewrite the test to not use a macro? (2) take a stab at fixing this in test-is? (3) get out of the way and let another Stuart handle it? :-) Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: test-is reporting problem
You do that. -another Stuart On Thu, Jan 15, 2009 at 10:32 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: I was afraid that would happen. I'll fix it, probably tomorrow. -the other Stuart On Jan 15, 6:27 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: The improved error reposting in test-is breaks some tests, e.g. from the book: (deftest test-lazy-index-of-any-with-match (is (with-out-str (is (zero? (index-of-any zzabyycdxx #{\z \a} Iterating overz\n) (is (with-out-str (is (= 3 (index-of-any zzabyycdxx #{\b \y} Iterating overz\nIterating over z\nIterating over a\n)) The problem is that it tries to take the value of with-out-str, not realizing that it is a macro. Should I (1) rewrite the test to not use a macro? (2) take a stab at fixing this in test-is? (3) get out of the way and let another Stuart handle it? :-) Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---