SMBIOS Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
cppunit
interface
testStandalone.h
Go to the documentation of this file.
1
// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
2
/*
3
* Copyright (C) 2005 Dell Inc.
4
* by Michael Brown <Michael_E_Brown@dell.com>
5
* Licensed under the Open Software License version 2.1
6
*
7
* Alternatively, you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published
9
* by the Free Software Foundation; either version 2 of the License,
10
* or (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
* See the GNU General Public License for more details.
16
*/
17
18
19
#ifndef _TESTSTANDALONE_H
20
#define _TESTSTANDALONE_H
21
22
#include "
smbios/compat.h
"
23
24
#include <cppunit/extensions/HelperMacros.h>
25
#include <typeinfo>
26
#include <string>
27
28
#include "
smbios/ISmbios.h
"
29
#include "
smbios/ICmosRW.h
"
30
#include "
smbios/IToken.h
"
31
#include "
smbios/SystemInfo.h
"
32
33
#include "
XmlUtils.h
"
34
35
#include "
outputctl.h
"
36
37
extern
int
global_argc
;
38
extern
char
**
global_argv
;
39
40
class
testStandalone
:
public
CppUnit::TestFixture
41
{
42
protected
:
43
virtual
std::string
getCppunitTopDirectory
()
44
{
45
//return TEST_DIR;
46
return
global_argv
[1];
47
}
48
virtual
std::string
getWritableDirectory
()
49
{
50
//return DEFAULT_TEST_DIR;
51
return
global_argv
[2];
52
};
53
54
55
virtual
std::string
getTestName
()
56
{
57
//return TEST_DIR;
58
return
global_argv
[3];
59
}
60
virtual
std::string
getTestDirectory
()
61
{
62
//return DEFAULT_TEST_DIR;
63
return
global_argv
[4];
64
};
65
66
public
:
67
virtual
void
setUp
();
68
virtual
void
tearDown
();
69
70
// base smbios test
71
void
testSmbiosTableBase
();
72
void
testSmbiosTableBase_iterNextItem
();
73
void
testSmbiosTableBase_findItemByType
();
74
void
testSmbiosTableBase_findItemByHandle
();
75
76
// table tests
77
void
testTable_Subscript
();
78
void
testEntryCount
();
79
void
testConstIterator
();
80
void
testSubscriptOperator1
();
81
void
testSubscriptOperator2
();
82
void
testSubscriptOperator3
();
83
void
testSmbiosXml
();
84
85
// item tests
86
void
testStreamify
();
87
void
testEachItemAccessors
();
88
void
testItemIdentity
();
89
void
testGetBoundaries
();
90
91
// memory tests
92
void
testMemoryBadFiles
();
93
void
testMemoryFuncs
();
94
95
// cmos token tests
96
void
testCmosConstructor
();
97
98
// smi tests
99
void
testSmi_callingInterface
();
100
void
testSmi_callingInterface_physaddr
();
101
102
// testInput.xml tests
103
void
testServiceTagWriting
();
104
void
testLibraryVersion
();
105
106
// other
107
void
testStateBytes
();
108
109
// Exception Tests
110
void
testException
();
111
112
// Exception Tests
113
void
testNonXml
();
114
115
116
// make sure to put this at the end...
117
CPPUNIT_TEST_SUITE
(
testStandalone
);
118
119
CPPUNIT_TEST
(
testSmbiosTableBase
);
120
CPPUNIT_TEST
(
testSmbiosTableBase_iterNextItem
);
121
CPPUNIT_TEST
(
testSmbiosTableBase_findItemByType
);
122
CPPUNIT_TEST
(
testSmbiosTableBase_findItemByHandle
);
123
124
CPPUNIT_TEST
(
testTable_Subscript
);
125
CPPUNIT_TEST
(
testEntryCount
);
126
CPPUNIT_TEST
(
testConstIterator
);
127
CPPUNIT_TEST
(
testSubscriptOperator1
);
128
CPPUNIT_TEST
(
testSubscriptOperator2
);
129
CPPUNIT_TEST
(
testSubscriptOperator3
);
130
CPPUNIT_TEST
(
testSmbiosXml
);
131
132
CPPUNIT_TEST
(
testStreamify
);
133
CPPUNIT_TEST
(
testItemIdentity
);
134
CPPUNIT_TEST
(
testEachItemAccessors
);
135
CPPUNIT_TEST
(
testGetBoundaries
);
136
137
138
CPPUNIT_TEST
(
testMemoryBadFiles
);
139
CPPUNIT_TEST
(
testMemoryFuncs
);
140
141
CPPUNIT_TEST
(
testCmosConstructor
);
142
143
CPPUNIT_TEST
(
testSmi_callingInterface
);
144
CPPUNIT_TEST
(
testSmi_callingInterface_physaddr
);
145
146
CPPUNIT_TEST
(
testLibraryVersion
);
147
CPPUNIT_TEST
(
testException
);
148
149
CPPUNIT_TEST
(
testNonXml
);
150
151
CPPUNIT_TEST_SUITE_END
();
152
};
153
154
#endif
Generated on Thu Mar 27 2014 09:27:18 for SMBIOS Library by
1.8.1.2