test.cpp
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #include <test.h>
23 
25 {
26 }
27 
28 bool
30 {
31  return true;
32 }
33 
34 bool
36 {
37  return true;
38 }
39 
40 bool
42 {
43  this->test_error_codes_valid();
44  this->test_error_codes_unknown();
45 
46  this->test_string_literal();
47  this->test_string_to_string();
48 
49  this->test_vector_find();
50  this->test_vector_cfind();
51  this->test_vector_take();
52  this->test_vector_remove();
53 
54  this->test_guard_exceptions_no_return();
55  this->test_guard_exceptions_with_return();
56 
57  this->test_bitmanip_set_bit();
58  this->test_bitmanip_clear_bit();
59  this->test_bitmanip_get_bit();
60  this->test_bitmanip_is_bit_set();
61  this->test_bitmanip_is_bit_cleared();
62  this->test_bitmanip_num_bits_set();
63  this->test_bitmanip_get_bits();
64  this->test_bitmanip_set_bits();
65 
66  this->test_exceptions();
67 
68  this->test_upper();
69  this->test_lower();
70 
71  return true;
72 }
73 
74 int
75 main(int argc, char *argv[])
76 {
77  return RUN_ALL_TESTS(misc_ut);
78 }
int main(int argc, char *argv[])
Definition: test.cpp:221
Definition: test.h:27
bool list() override
Definition: test.cpp:41
misc_ut()
Definition: test.cpp:24
#define RUN_ALL_TESTS(ut)
Definition: unittest.h:246
bool init() override
Definition: test.cpp:29
bool fini() override
Definition: test.cpp:35