Ignore:
Timestamp:
Sep 22, 2011, 9:16:05 AM (11 years ago)
Author:
sam
Message:

core: implement real subtraction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/real.cpp

    r973 r974  
    8989    LOLUNIT_TEST(test_real_sub)
    9090    {
    91 #if 0
    92 printf("\n");
    93 real k(1.25f);
    94 k.print();
    95 real l(1.0f);
    96 l.print();
    97 real m = k - l;
    98 m.print();
    99 #endif
    100         LOLUNIT_ASSERT(true);
     91        float a1 = real(1.0f) + real(1e20f) - real(1e20f);
     92
     93        LOLUNIT_ASSERT_EQUAL(a1, 1.0f);
    10194    }
    10295
Note: See TracChangeset for help on using the changeset viewer.