first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / core / library / tests_basis / test_boilerplate.cpp
1 /*****************************************************************************\
2 *                                                                             *
3 *  Name   : test_boilerplate                                                  *
4 *  Author : Chris Koeritz                                                     *
5 *                                                                             *
6 *  Purpose:                                                                   *
7 *                                                                             *
8 *    Puts an object through its pacess--this is intended to provide the basic *
9 *  framework for a unit test using the hoople testing framework.              *
10 *                                                                             *
11 *******************************************************************************
12 * Copyright (c) 2011-$now By Author.  This program is free software; you can  *
13 * redistribute it and/or modify it under the terms of the GNU General Public  *
14 * License as published by the Free Software Foundation; either version 2 of   *
15 * the License or (at your option) any later version.  This is online at:      *
16 *     http://www.fsf.org/copyleft/gpl.html                                    *
17 * Please send any updates to: fred@gruntose.com                               *
18 \*****************************************************************************/
19
20 #include <application/hoople_main.h>
21 #include <basis/functions.h>
22 #include <basis/guards.h>
23 #include <loggers/combo_logger.h>
24 #include <structures/static_memory_gremlin.h>
25 #include <unit_test/unit_base.h>
26
27 #include <memory.h>
28 #include <stdlib.h>
29
30 using namespace application;
31 using namespace basis;
32 using namespace filesystem;
33 using namespace loggers;
34 using namespace unit_test;
35
36 #define LOG(to_print) EMERGENCY_LOG(program_wide_logger::get(), to_print)
37
38 //////////////
39
40 class test_boilerplate : virtual public unit_base, virtual public application_shell
41 {
42 public:
43   test_boilerplate() : unit_base() {}
44   DEFINE_CLASS_NAME("test_boilerplate");
45   virtual int execute();
46 };
47
48 HOOPLE_MAIN(test_boilerplate, );
49
50 //////////////
51
52 int test_boilerplate::execute()
53 {
54   FUNCDEF("execute");
55 //do some testing
56   ASSERT_TRUE(true, "true is somehow not true?");
57   return final_report();
58 }
59