exit_handler_intel_x64_unittests.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 
23 
24 #ifndef INCLUDE_LIBCXX_UNITTESTS
25 
26 void
28 { (void) regs; }
29 
30 #else
31 
32 void
34 {
35  switch (regs.r02)
36  {
37  case 0x1001: unittest_1001_containers_array(); break;
38  case 0x1002: unittest_1002_containers_vector(); break;
39  case 0x1003: unittest_1003_containers_deque(); break;
40  case 0x1004: unittest_1004_containers_forward_list(); break;
41  case 0x1005: unittest_1005_containers_list(); break;
42  case 0x1006: unittest_1006_containers_stack(); break;
43  case 0x1007: unittest_1007_containers_queue(); break;
44  case 0x1008: unittest_1008_containers_priority_queue(); break;
45  case 0x1009: unittest_1009_containers_set(); break;
46  case 0x100A: unittest_100A_containers_map(); break;
47 
48  case 0x1100: unittest_1100_io_cout(); break;
49  case 0x1101: unittest_1101_io_manipulators(); break;
50 
51  default:
52  throw std::runtime_error("unknown unit test #");
53  }
54 }
55 
56 #endif
virtual void handle_vmcall_unittest(vmcall_registers_t &regs)