Ignore:
Timestamp:
May 15, 2011, 1:16:18 PM (9 years ago)
Author:
sam
Message:

core: add the unary minus operator to vectors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/matrix.cpp

    r757 r768  
    2828    CPPUNIT_TEST(test_vec_eq);
    2929    CPPUNIT_TEST(test_vec_lt);
     30    CPPUNIT_TEST(test_vec_unary);
    3031    CPPUNIT_TEST(test_mat_det);
    3132    CPPUNIT_TEST(test_mat_mul);
     
    123124    }
    124125
     126    void test_vec_unary()
     127    {
     128        vec2 a(1.0f, 3.0f);
     129        vec2 b(-1.0f, -3.0f);
     130
     131        CPPUNIT_ASSERT(a == -b);
     132        CPPUNIT_ASSERT(-a == b);
     133    }
     134
    125135    void test_mat_det()
    126136    {
Note: See TracChangeset for help on using the changeset viewer.