I expected that JSTD treated "000011" (string) as not equal to 11 (number).
But, taking a look at he actual JSTD code, assertEquals returns
(a === e)
only if one of the elements are Objects, otherwise returns
(a == e)
isn't this wrong?
I expected that JSTD treated "000011" (string) as not equal to 11 (number).
But, taking a look at he actual JSTD code, assertEquals returns
(a === e)
only if one of the elements are Objects, otherwise returns
(a == e)
isn't this wrong?
I can't really answer your main question (whether the assertion implementation is "wrong"), but to get at what you are trying to do, you can always write an assertion as such:
var str = '000011';
var num = 11;
assertTrue(str !== num);
Or if you want to ensure that the two variables have the same value and type:
assertTrue(str === num);