Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (11 years ago)
Author:
Sam Hocevar
Message:

Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.

Location:
libcaca/trunk/tests
Files:
1 deleted
5 edited

Legend:

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

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

    r2309 r2821  
    11# $Id$
    22
    3 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
    4               -I$(top_srcdir)/caca
     3AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/caca -I../caca
    54
    65if USE_CPPUNIT
    7 cppunit_tests = cucul-test caca-test
     6cppunit_tests = caca-test
    87endif
    98
     
    1312
    1413simple_SOURCES = simple.c
    15 simple_LDADD = ../cucul/libcucul.la
     14simple_LDADD = ../caca/libcaca.la
    1615
    17 cucul_test_SOURCES = cucul-test.cpp canvas.cpp
    18 cucul_test_CXXFLAGS = $(CPPUNIT_CFLAGS)
    19 cucul_test_LDADD = ../cucul/libcucul.la $(CPPUNIT_LIBS)
    20 
    21 caca_test_SOURCES = caca-test.cpp driver.cpp
     16caca_test_SOURCES = caca-test.cpp canvas.cpp driver.cpp
    2217caca_test_CXXFLAGS = $(CPPUNIT_CFLAGS)
    2318caca_test_LDADD = ../caca/libcaca.la $(CPPUNIT_LIBS)
  • libcaca/trunk/tests/caca-test.cpp

    r2309 r2821  
    11/*
    2  *  caca-test     testsuite program for libcaca
     2 *  cucul-test     testsuite program for libcucul
    33 *  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
    44 *                All Rights Reserved
  • libcaca/trunk/tests/canvas.cpp

    r2309 r2821  
    11/*
    2  *  cucul-test    testsuite program for libcucul
     2 *  caca-test     testsuite program for libcaca
    33 *  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
    44 *                All Rights Reserved
     
    2020#include <cppunit/TestSuite.h>
    2121
    22 #include "cucul.h"
     22#include "caca.h"
    2323
    2424class CanvasTest : public CppUnit::TestCase
     
    3939    void test_creation()
    4040    {
    41         cucul_canvas_t *cv;
     41        caca_canvas_t *cv;
    4242
    43         cv = cucul_create_canvas(0, 0);
     43        cv = caca_create_canvas(0, 0);
    4444        CPPUNIT_ASSERT(cv != NULL);
    4545
    46         cucul_free_canvas(cv);
     46        caca_free_canvas(cv);
    4747    }
    4848
    4949    void test_resize()
    5050    {
    51         cucul_canvas_t *cv;
     51        caca_canvas_t *cv;
    5252
    53         cv = cucul_create_canvas(0, 0);
    54         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0);
    55         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0);
     53        cv = caca_create_canvas(0, 0);
     54        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_width(cv), 0);
     55        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_height(cv), 0);
    5656
    57         cucul_set_canvas_size(cv, 1, 1);
    58         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1);
    59         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1);
     57        caca_set_canvas_size(cv, 1, 1);
     58        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_width(cv), 1);
     59        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_height(cv), 1);
    6060
    61         cucul_set_canvas_size(cv, 1234, 1001);
    62         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 1234);
    63         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 1001);
     61        caca_set_canvas_size(cv, 1234, 1001);
     62        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_width(cv), 1234);
     63        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_height(cv), 1001);
    6464
    65         cucul_set_canvas_size(cv, 0, 0);
    66         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_width(cv), 0);
    67         CPPUNIT_ASSERT_EQUAL(cucul_get_canvas_height(cv), 0);
     65        caca_set_canvas_size(cv, 0, 0);
     66        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_width(cv), 0);
     67        CPPUNIT_ASSERT_EQUAL(caca_get_canvas_height(cv), 0);
    6868
    69         cucul_free_canvas(cv);
     69        caca_free_canvas(cv);
    7070    }
    7171
    7272    void test_chars()
    7373    {
    74         cucul_canvas_t *cv;
     74        caca_canvas_t *cv;
    7575
    76         cv = cucul_create_canvas(0, 0);
    77         CPPUNIT_ASSERT(cucul_get_char(cv, 0, 0) == ' ');
     76        cv = caca_create_canvas(0, 0);
     77        CPPUNIT_ASSERT(caca_get_char(cv, 0, 0) == ' ');
    7878
    79         cucul_put_char(cv, 0, 0, 'x');
    80         CPPUNIT_ASSERT(cucul_get_char(cv, 0, 0) == ' ');
     79        caca_put_char(cv, 0, 0, 'x');
     80        CPPUNIT_ASSERT(caca_get_char(cv, 0, 0) == ' ');
    8181
    82         cucul_set_canvas_size(cv, 1, 1);
    83         CPPUNIT_ASSERT(cucul_get_char(cv, 0, 0) == ' ');
     82        caca_set_canvas_size(cv, 1, 1);
     83        CPPUNIT_ASSERT(caca_get_char(cv, 0, 0) == ' ');
    8484
    85         cucul_put_char(cv, 0, 0, 'x');
    86         CPPUNIT_ASSERT(cucul_get_char(cv, 0, 0) == 'x');
     85        caca_put_char(cv, 0, 0, 'x');
     86        CPPUNIT_ASSERT(caca_get_char(cv, 0, 0) == 'x');
    8787
    88         cucul_put_char(cv, 0, 0, 'y');
    89         CPPUNIT_ASSERT(cucul_get_char(cv, 0, 0) == 'y');
     88        caca_put_char(cv, 0, 0, 'y');
     89        CPPUNIT_ASSERT(caca_get_char(cv, 0, 0) == 'y');
    9090
    91         cucul_set_canvas_size(cv, 1000, 1000);
    92         CPPUNIT_ASSERT(cucul_get_char(cv, 999, 999) == ' ');
     91        caca_set_canvas_size(cv, 1000, 1000);
     92        CPPUNIT_ASSERT(caca_get_char(cv, 999, 999) == ' ');
    9393
    94         cucul_put_char(cv, 999, 999, 'z');
    95         CPPUNIT_ASSERT(cucul_get_char(cv, 999, 999) == 'z');
     94        caca_put_char(cv, 999, 999, 'z');
     95        CPPUNIT_ASSERT(caca_get_char(cv, 999, 999) == 'z');
    9696
    97         cucul_free_canvas(cv);
     97        caca_free_canvas(cv);
    9898    }
    9999};
  • libcaca/trunk/tests/simple.c

    r2299 r2821  
    2020#endif
    2121
    22 #include "cucul.h"
     22#include "caca.h"
    2323
    2424#define TEST(x) \
     
    3535int main(int argc, char *argv[])
    3636{
    37     cucul_canvas_t *cv;
     37    caca_canvas_t *cv;
    3838    int tests = 0, passed = 0;
    3939
    40     cv = cucul_create_canvas(0, 0);
    41     cucul_put_char(cv, 0, 0, 'x');
    42     TEST(cucul_get_char(cv, 0, 0) != 'x');
     40    cv = caca_create_canvas(0, 0);
     41    caca_put_char(cv, 0, 0, 'x');
     42    TEST(caca_get_char(cv, 0, 0) != 'x');
    4343
    44     cucul_set_canvas_size(cv, 1, 1);
    45     TEST(cucul_get_char(cv, 0, 0) != 'x');
    46     TEST(cucul_get_char(cv, 0, 0) == ' ');
     44    caca_set_canvas_size(cv, 1, 1);
     45    TEST(caca_get_char(cv, 0, 0) != 'x');
     46    TEST(caca_get_char(cv, 0, 0) == ' ');
    4747
    48     cucul_put_char(cv, 0, 0, 'y');
    49     TEST(cucul_get_char(cv, 0, 0) == 'y');
     48    caca_put_char(cv, 0, 0, 'y');
     49    TEST(caca_get_char(cv, 0, 0) == 'y');
    5050
    51     cucul_set_canvas_size(cv, 1000, 1000);
    52     TEST(cucul_get_canvas_width(cv) == 1000);
     51    caca_set_canvas_size(cv, 1000, 1000);
     52    TEST(caca_get_canvas_width(cv) == 1000);
    5353
    54     cucul_put_char(cv, 999, 999, 'z');
    55     TEST(cucul_get_char(cv, 999, 999) == 'z');
     54    caca_put_char(cv, 999, 999, 'z');
     55    TEST(caca_get_char(cv, 999, 999) == 'z');
    5656
    57     cucul_free_canvas(cv);
     57    caca_free_canvas(cv);
    5858
    5959    fprintf(stderr, "%i tests, %i errors\n", tests, tests - passed);
Note: See TracChangeset for help on using the changeset viewer.