ProteoWizard
Functions | Variables
ClickwrapPrompterTest.cpp File Reference
#include "unit.hpp"
#include "ClickwrapPrompter.hpp"
#include "Std.hpp"

Go to the source code of this file.

Functions

void test ()
 
int main (int argc, char *argv[])
 

Variables

ostream * os_ = 0
 

Function Documentation

◆ test()

void test ( )

Definition at line 34 of file ClickwrapPrompterTest.cpp.

35{
36 unit_assert(ClickwrapPrompter::prompt("Test", "This is a test of the emergency prompting system.", "test"));
37}
static bool prompt(const std::string &caption, const std::string &text, const std::string &oneTimeKey="")
shows a modal dialog with the specified caption, text, and Agree/Disagree buttons; returns true iff t...
#define unit_assert(x)
Definition unit.hpp:85

References pwiz::util::ClickwrapPrompter::prompt(), and unit_assert.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 40 of file ClickwrapPrompterTest.cpp.

41{
42 TEST_PROLOG(argc, argv)
43
44 try
45 {
46 if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
47 if (os_) *os_ << "ClickwrapPrompterTest\n";
48 test();
49 }
50 catch (exception& e)
51 {
52 TEST_FAILED(e.what())
53 }
54 catch (...)
55 {
56 TEST_FAILED("Caught unknown exception.")
57 }
58
60}
ostream * os_
void test()
#define TEST_EPILOG
Definition unit.hpp:183
#define TEST_FAILED(x)
Definition unit.hpp:177
#define TEST_PROLOG(argc, argv)
Definition unit.hpp:175

References os_, test(), TEST_EPILOG, TEST_FAILED, and TEST_PROLOG.

Variable Documentation

◆ os_

ostream* os_ = 0

Definition at line 31 of file ClickwrapPrompterTest.cpp.

Referenced by main().