Digital Authentication Framework  6.0.1.37
daf_testlib.h
Go to the documentation of this file.
1 /*
2  * (c) 2016 Good Technology Corporation. All rights reserved.
3  */
4 
16 #ifndef DAF_TESTLIB_H
17 #define DAF_TESTLIB_H
18 
20 
29 typedef unsigned int DATestId;
30 
31 const DATestId ALL_TESTS_FIRST = 1000;
32 
35 
37 const DATestId SMIME_TESTS_LAST = 2999;
38 
39 const DATestId TLS_TESTS_FIRST = 3000;
40 const DATestId TLS_TESTS_LAST = 3999;
41 
42 const DATestId ALL_TESTS_LAST = 9999;
43 
52 {
53 public:
57  virtual DADevice *getDevice() = 0;
58 
66  virtual DASession *getSession() = 0;
67 
75  virtual void startTest( DATestId testId, const char *testName ) = 0;
76 
84  virtual void comment( const char *text ) { };
85 
98  virtual void error( const char *text, DAError *daError = NULL ) = 0;
99 
108  virtual void endTest() = 0;
109 };
110 
117 {
118 public:
128  static void runTests(DATestInterface &wrapper, DATestId first, DATestId last);
129 
130 };
131 
132 #endif // DAF_TESTLIB_H
Main C++ interface to authentication device.
virtual void startTest(DATestId testId, const char *testName)=0
Called before a test begins.
Interface to "session" object.
Definition: DigitalAuthenticationFramework.h:196
const DATestId TLS_TESTS_FIRST
First tests for TLS client-auth key.
Definition: daf_testlib.h:39
const DATestId ALL_TESTS_LAST
Highest test number for all tests.
Definition: daf_testlib.h:42
const DATestId GENERAL_TESTS_FIRST
First general DAF implementation test.
Definition: daf_testlib.h:33
const DATestId SMIME_TESTS_LAST
Last SMIME key test.
Definition: daf_testlib.h:37
const DATestId TLS_TESTS_LAST
Last TLS key test.
Definition: daf_testlib.h:40
const DATestId SMIME_TESTS_FIRST
First test for SMIME-capable keys.
Definition: daf_testlib.h:36
virtual void comment(const char *text)
Called to record a comment, for debugging.
Definition: daf_testlib.h:84
Run a sequence of tests.
Definition: daf_testlib.h:116
virtual void endTest()=0
Called at the end of each test.
Interface for error reporting.
Definition: DigitalAuthenticationFramework.h:81
const DATestId ALL_TESTS_FIRST
Lowest test number for all tests.
Definition: daf_testlib.h:31
virtual void error(const char *text, DAError *daError=NULL)=0
Reports a test error.
Interface between test library and test environment.
Definition: daf_testlib.h:51
unsigned int DATestId
Test identification.
Definition: daf_testlib.h:29
virtual DADevice * getDevice()=0
Called to get a device used for the tests.
const DATestId GENERAL_TESTS_LAST
Last general test.
Definition: daf_testlib.h:34
virtual DASession * getSession()=0
Called to get a session to use for the tests.
Interface to device object.
Definition: DigitalAuthenticationFramework.h:159