Debian Codegraph @

src/test_dinkini.cxx

raw
1 /**
2 * Test suite for Dink INI parsing and sequence configuration
3
4 * Copyright (C) 2015 Sylvain Beucler
5
6 * This file is part of GNU FreeDink
7
8 * GNU FreeDink is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 3 of the
11 * License, or (at your option) any later version.
12
13 * GNU FreeDink is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 */
22
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26
27 #include <cxxtest/TestSuite.h>
28
29 #include "dinkini.h"
30 #include "SDL.h"
31 #include "IOGfxDisplay.h"
32
33 /* Mocks */
34 int truecolor = 1;
35 SDL_Surface *GFX_backbuffer, *GFX_tmp2;
36 IOGfxDisplay* g_display = NULL;
37
38 extern int PlayMidi(char *sFileName) { return 1; }
39 extern SDL_Surface* load_bmp_from_fp(FILE* in) { return NULL; }
40
41 extern int nb_idata;
42
43 class TestDinkIni : public CxxTest::TestSuite {
44 public:
45 void setUp() {
46 }
47 void tearDown() {
48 }
49
50 void test_dinkini_init() {
51 dinkini_init(123);
52 TS_ASSERT_EQUALS(nb_idata, 123);
53 }
54 };