Ignore:
Timestamp:
Apr 21, 2008, 12:10:42 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Started libcaca unit tests.
Location:
libcaca/trunk/tests
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/tests/.gitignore

    r2301 r2309  
    11simple
    22cucul-test
     3caca-test
  • libcaca/trunk/tests/Makefile.am

    r2301 r2309  
    11# $Id$
    22
    3 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul
     3AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
     4              -I$(top_srcdir)/caca
    45
    56if USE_CPPUNIT
    6 cppunit_tests = cucul-test
     7cppunit_tests = cucul-test caca-test
    78endif
    89
     
    1516
    1617cucul_test_SOURCES = cucul-test.cpp canvas.cpp
    17 cucul_test_CPPFLAGS = $(CPPUNIT_CFLAGS)
     18cucul_test_CXXFLAGS = $(CPPUNIT_CFLAGS)
    1819cucul_test_LDADD = ../cucul/libcucul.la $(CPPUNIT_LIBS)
    1920
     21caca_test_SOURCES = caca-test.cpp driver.cpp
     22caca_test_CXXFLAGS = $(CPPUNIT_CFLAGS)
     23caca_test_LDADD = ../caca/libcaca.la $(CPPUNIT_LIBS)
     24
  • libcaca/trunk/tests/canvas.cpp

    r2301 r2309  
    11/*
    22 *  cucul-test    testsuite program for libcucul
    3  *  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
    43 *  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
    54 *                All Rights Reserved
     
    5352
    5453        cv = cucul_create_canvas(0, 0);
    55         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0U);
    56         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0U);
     54        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0);
     55        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0);
    5756
    5857        cucul_set_canvas_size(cv, 1, 1);
    59         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1U);
    60         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1U);
     58        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1);
     59        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1);
    6160
    6261        cucul_set_canvas_size(cv, 1234, 1001);
    63         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1234U);
    64         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1001U);
     62        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1234);
     63        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1001);
    6564
    6665        cucul_set_canvas_size(cv, 0, 0);
    67         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0U);
    68         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0U);
     66        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0);
     67        CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0);
    6968
    7069        cucul_free_canvas(cv);
Note: See TracChangeset for help on using the changeset viewer.