* [rust-dev] surprising test failure with "panicked at 'Box<Any>'"
@ 2014-11-16 21:25 Max R.D. Parmer
2014-11-17 16:48 ` Steven Fackler
0 siblings, 1 reply; 3+ messages in thread
From: Max R.D. Parmer @ 2014-11-16 21:25 UTC (permalink / raw)
To: rust-dev
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
The code and error generated from the test suite are here:
https://gist.github.com/maxrp/e8b17669d18006471434
Where things get strange to me (is this a bug?) is how main() works as
expected and the first test passes but the second test fails with this
odd "panicked at 'Box<Any>'" -- I'm not sure where the Box occurs --
possibly libtest?
I'm using the latest nightlies:
rustc --version && cargo --version
rustc 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000)
cargo 0.0.1-pre-nightly (56852db 2014-11-14 23:33:33 +0000)
Secondary to the specific issue, any remarks on style and idiom are also
welcome.
Thanks,
Max
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rust-dev] surprising test failure with "panicked at 'Box<Any>'"
2014-11-16 21:25 [rust-dev] surprising test failure with "panicked at 'Box<Any>'" Max R.D. Parmer
@ 2014-11-17 16:48 ` Steven Fackler
2014-11-17 17:37 ` Max R.D. Parmer
0 siblings, 1 reply; 3+ messages in thread
From: Steven Fackler @ 2014-11-17 16:48 UTC (permalink / raw)
To: Max R.D. Parmer, rust-dev
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
assert! Takes a boolean expression and an optional error message. The
`false` is being interpreted as an error message which results in the
Box<Any> output. You probably want to use assert_eq!
On Mon Nov 17 2014 at 8:31:46 AM Max R.D. Parmer <maxp@trystero.is> wrote:
> The code and error generated from the test suite are here:
> https://gist.github.com/maxrp/e8b17669d18006471434
>
> Where things get strange to me (is this a bug?) is how main() works as
> expected and the first test passes but the second test fails with this
> odd "panicked at 'Box<Any>'" -- I'm not sure where the Box occurs --
> possibly libtest?
>
> I'm using the latest nightlies:
> rustc --version && cargo --version
> rustc 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000)
> cargo 0.0.1-pre-nightly (56852db 2014-11-14 23:33:33 +0000)
>
> Secondary to the specific issue, any remarks on style and idiom are also
> welcome.
>
> Thanks,
> Max
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
[-- Attachment #2: Type: text/html, Size: 1628 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rust-dev] surprising test failure with "panicked at 'Box<Any>'"
2014-11-17 16:48 ` Steven Fackler
@ 2014-11-17 17:37 ` Max R.D. Parmer
0 siblings, 0 replies; 3+ messages in thread
From: Max R.D. Parmer @ 2014-11-17 17:37 UTC (permalink / raw)
To: Steven Fackler, rust-dev
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
Augh! Thanks.
On November 17, 2014 8:48:53 AM PST, Steven Fackler <sfackler@gmail.com> wrote:
>assert! Takes a boolean expression and an optional error message. The
>`false` is being interpreted as an error message which results in the
>Box<Any> output. You probably want to use assert_eq!
>
>On Mon Nov 17 2014 at 8:31:46 AM Max R.D. Parmer <maxp@trystero.is>
>wrote:
>
>> The code and error generated from the test suite are here:
>> https://gist.github.com/maxrp/e8b17669d18006471434
>>
>> Where things get strange to me (is this a bug?) is how main() works
>as
>> expected and the first test passes but the second test fails with
>this
>> odd "panicked at 'Box<Any>'" -- I'm not sure where the Box occurs --
>> possibly libtest?
>>
>> I'm using the latest nightlies:
>> rustc --version && cargo --version
>> rustc 0.13.0-nightly (d91a015ab 2014-11-14 23:37:27 +0000)
>> cargo 0.0.1-pre-nightly (56852db 2014-11-14 23:33:33 +0000)
>>
>> Secondary to the specific issue, any remarks on style and idiom are
>also
>> welcome.
>>
>> Thanks,
>> Max
>> _______________________________________________
>> Rust-dev mailing list
>> Rust-dev@mozilla.org
>> https://mail.mozilla.org/listinfo/rust-dev
>>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
[-- Attachment #2: Type: text/html, Size: 2055 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-17 17:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-16 21:25 [rust-dev] surprising test failure with "panicked at 'Box<Any>'" Max R.D. Parmer
2014-11-17 16:48 ` Steven Fackler
2014-11-17 17:37 ` Max R.D. Parmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox