Ah! That's excellent advice, thank you again!
 
20.01.2017, 02:25, "Jon Harper" <jon.harpe...@gmail.com>:
A classic workaround when = is not what you want in unit tests is to do the work in the quotation and return a boolean (or anything for which = works) and use { t } as the expected output.
 
 
Le 20 janv. 2017 00:08, "Alexander Ilin" <ajs...@yandex.ru> a écrit :
Thank you, Jon, now I understand what the problem is.
Unfortunately, in my case I can't use `number=` because the comparison is done by the unit-test word.
In the following code the first test succeeds, but the second one fails:
 
```
{ 15 } [ 10 20 middle ] unit-test
{ -40.5 } [ -50 -31 middle ] unit-test
```
 
20.01.2017, 01:30, "Jon Harper" <jon.harpe...@gmail.com>:
Hi,
you have to use number= to compare numbers with different types.
http://docs.factorcode.org/content/word-number=,math.html
 
Jon
 
Jon
 
On Thu, Jan 19, 2017 at 10:50 PM, Alexander Ilin <ajs...@yandex.ru> wrote:
Hello!

  I'm a bit confused. Why is following not true?

  `81/2 40.5 =`

---=====---
 Александр

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk
,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

,

_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

 
 
---=====---
Александр
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk
 
,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

,

_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

 
 
---=====---
Александр
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to