Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Private Attributes
SelfTest::TestBase Class Referenceabstract

The Test class is the base class for a single test for the Envision testing framework. More...

Inheritance diagram for SelfTest::TestBase:
SelfTest::Test< OOModelPlugin, SimpleProjectTest > SelfTest::Test< ModelBasePlugin, SingleWriteUnitCheck > SelfTest::Test< FilePersistencePlugin, noChange > SelfTest::Test< FilePersistencePlugin, SaveRootOnly > SelfTest::Test< FilePersistencePlugin, RunMerge > SelfTest::Test< FilePersistencePlugin, PasteListFromClipboard > SelfTest::Test< OODebugPlugin, SimpleTest > SelfTest::Test< ModelBasePlugin, ListUndo > SelfTest::Test< InteractionBasePlugin, TextSelect > SelfTest::Test< CustomMethodCallPlugin, CustomVisTest > SelfTest::Test< ModelBasePlugin, ListInsertion > SelfTest::Test< ModelBasePlugin, ChildNodeRetrieval > SelfTest::Test< FilePersistencePlugin, intValueChange > SelfTest::Test< FilePersistencePlugin, deletion > SelfTest::Test< FilePersistencePlugin, PasteTextFromClipboard > SelfTest::Test< FilePersistencePlugin, CopyPartialToClipboard > SelfTest::Test< ExportPlugin, ExportJustText > SelfTest::Test< JavaExportPlugin, SimpleTest > SelfTest::Test< FilePersistencePlugin, insert > SelfTest::Test< FilePersistencePlugin, PasteBinaryFromClipboard > SelfTest::Test< FilePersistencePlugin, MoveVsInsertConflict > SelfTest::Test< FilePersistencePlugin, MoveAndListChangesResolvable > SelfTest::Test< FilePersistencePlugin, LoadingPartialList > SelfTest::Test< FilePersistencePlugin, CopyToClipboard > SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveDel > SelfTest::Test< CppImportLightPlugin, SimpleTest > SelfTest::Test< ModelBasePlugin, UndoRedoOptionalNodes > SelfTest::Test< ModelBasePlugin, SimpleTreeManagerCreation > SelfTest::Test< ModelBasePlugin, ModificationNotificationTests > SelfTest::Test< InformationScriptingPlugin, SimpleTest > SelfTest::Test< FilePersistencePlugin, SaveModeNodesSingleUnitOnly > SelfTest::Test< FilePersistencePlugin, MoveInAndListChangesResolvable > SelfTest::Test< FilePersistencePlugin, MoveChangeBetweenListsResolvable > SelfTest::Test< FilePersistencePlugin, LoadModeNodesSingleUnitOnly > SelfTest::Test< ContractsLibraryPlugin, ContractsLibraryTest > SelfTest::Test< OOModelPlugin, SimpleClassTest > SelfTest::Test< ModelBasePlugin, UndoRedoTextSet > SelfTest::Test< FilePersistencePlugin, BothChangeSameList_Conflicts > SelfTest::Test< ExportPlugin, ExportAndDeleteDir > SelfTest::Test< CommentsPlugin, CommentsTest > SelfTest::Test< FilePersistencePlugin, stmtEdit > SelfTest::Test< ModelBasePlugin, RemoveOptional > SelfTest::Test< FilePersistencePlugin, addAndRename > SelfTest::Test< FilePersistencePlugin, LoadRootOnly > SelfTest::Test< FilePersistencePlugin, LoadMultipleUnits > SelfTest::Test< ModelBasePlugin, ListRemoval > SelfTest::Test< FilePersistencePlugin, TwoDeletesInSameListResolvable > SelfTest::Test< FilePersistencePlugin, TwoChangesSameList_DelInsNodes > SelfTest::Test< FilePersistencePlugin, TwoChangesSameList > SelfTest::Test< FilePersistencePlugin, SavingTypedList > SelfTest::Test< FilePersistencePlugin, ListsReorderInsertDeleteResolvable > SelfTest::Test< ExportPlugin, ExportAndDeleteFile > SelfTest::Test< OOInteractionPlugin, SimpleTest > SelfTest::Test< ModelBasePlugin, PersistenceSave > SelfTest::Test< ModelBasePlugin, CompositeMetaData > SelfTest::Test< FilePersistencePlugin, typeChange > SelfTest::Test< FilePersistencePlugin, TwoChangesDifferentLists > SelfTest::Test< FilePersistencePlugin, MoveCycleSimple > SelfTest::Test< FilePersistencePlugin, TwoChangesDifferentLists_LabelCycle > SelfTest::Test< ControlFlowVisualizationPlugin, SimpleTest > SelfTest::Test< CodeReviewPlugin, SimpleTest > SelfTest::Test< OOModelPlugin, JavaLibraryAndHelloWorldTest > SelfTest::Test< ModelBasePlugin, VisitorSample > SelfTest::Test< ModelBasePlugin, ProperRegistration > SelfTest::Test< ModelBasePlugin, PositionExtension > SelfTest::Test< FilePersistencePlugin, parentChange > SelfTest::Test< FilePersistencePlugin, TwoDeletesNoConflict > SelfTest::Test< FilePersistencePlugin, SaveMultipleUnits > SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveMove > SelfTest::Test< ExportPlugin, ExportAndModify > SelfTest::Test< VersionControlUIPlugin, SimpleTest > SelfTest::Test< FilePersistencePlugin, UnorderedAndUnitsConflicting > SelfTest::Test< FilePersistencePlugin, EvalMethodInsert > SelfTest::Test< FilePersistencePlugin, EvalLoopFix > SelfTest::Test< FilePersistencePlugin, EvalClassMove > SelfTest::Test< ExportPlugin, ExportIdentical > SelfTest::Test< CppExportPlugin, SimpleTest > SelfTest::Test< ModelBasePlugin, UndoRedoGroupTextSet > SelfTest::Test< ModelBasePlugin, ListCreation > SelfTest::Test< FilePersistencePlugin, SingleVersionChange > SelfTest::Test< FilePersistencePlugin, MoveChangeBySingleVersion > SelfTest::Test< FilePersistencePlugin, LoadingTypedList > SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveIns > SelfTest::Test< VisualizationBasePlugin, CompositeTest > SelfTest::Test< OOVisualizationPlugin, JavaLibraryAndHelloWorldTest > SelfTest::Test< FilePersistencePlugin, listReorder > SelfTest::Test< FilePersistencePlugin, PasteInListFromClipboard > SelfTest::Test< FilePersistencePlugin, LoadingFullList > SelfTest::Test< FilePersistencePlugin, TwoChangesSameList_LabelCycleResolvable > SelfTest::Test< ExportPlugin, CompositeFragmentTest > SelfTest::Test< AlloyPlugin, AlloyTest > SelfTest::Test< PluginClass, TestName >

Public Types

using TestConstructor = std::function< TestBase *()>
 

Public Member Functions

 TestBase (const QString &name)
 
virtual ~TestBase ()
 
const QString & getName () const
 
void run (TestResults &testResults)
 Runs the test and reports any failures to the specified test results. More...
 
virtual void runCustom (TestResults &testResults, bool &passed)=0
 Implements custom test behavior. More...
 

Private Attributes

QString name
 

Detailed Description

The Test class is the base class for a single test for the Envision testing framework.

Member Typedef Documentation

◆ TestConstructor

using SelfTest::TestBase::TestConstructor = std::function<TestBase* ()>

Constructor & Destructor Documentation

◆ TestBase()

SelfTest::TestBase::TestBase ( const QString &  name)

◆ ~TestBase()

SelfTest::TestBase::~TestBase ( )
virtual

Member Function Documentation

◆ getName()

const QString & SelfTest::TestBase::getName ( ) const

◆ run()

void SelfTest::TestBase::run ( TestResults testResults)

Runs the test and reports any failures to the specified test results.

Parameters
testResultsThe outcome of the test is saved in this object.

◆ runCustom()

virtual void SelfTest::TestBase::runCustom ( TestResults testResults,
bool &  passed 
)
pure virtual

Implements custom test behavior.

This function must be implemented for each test.

Parameters
testResultsTest failures are added here.
passedmust be set to false if the test failed.

Implemented in SelfTest::Test< PluginClass, TestName >, SelfTest::Test< OOModelPlugin, SimpleProjectTest >, SelfTest::Test< ModelBasePlugin, SingleWriteUnitCheck >, SelfTest::Test< FilePersistencePlugin, noChange >, SelfTest::Test< FilePersistencePlugin, SaveRootOnly >, SelfTest::Test< FilePersistencePlugin, RunMerge >, SelfTest::Test< FilePersistencePlugin, PasteListFromClipboard >, SelfTest::Test< OODebugPlugin, SimpleTest >, SelfTest::Test< ModelBasePlugin, ListUndo >, SelfTest::Test< InteractionBasePlugin, TextSelect >, SelfTest::Test< CustomMethodCallPlugin, CustomVisTest >, SelfTest::Test< ModelBasePlugin, ListInsertion >, SelfTest::Test< ModelBasePlugin, ChildNodeRetrieval >, SelfTest::Test< FilePersistencePlugin, intValueChange >, SelfTest::Test< FilePersistencePlugin, deletion >, SelfTest::Test< FilePersistencePlugin, PasteTextFromClipboard >, SelfTest::Test< FilePersistencePlugin, CopyPartialToClipboard >, SelfTest::Test< ExportPlugin, ExportJustText >, SelfTest::Test< JavaExportPlugin, SimpleTest >, SelfTest::Test< FilePersistencePlugin, insert >, SelfTest::Test< FilePersistencePlugin, PasteBinaryFromClipboard >, SelfTest::Test< FilePersistencePlugin, MoveVsInsertConflict >, SelfTest::Test< FilePersistencePlugin, MoveAndListChangesResolvable >, SelfTest::Test< FilePersistencePlugin, LoadingPartialList >, SelfTest::Test< FilePersistencePlugin, CopyToClipboard >, SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveDel >, SelfTest::Test< CppImportLightPlugin, SimpleTest >, SelfTest::Test< ModelBasePlugin, UndoRedoOptionalNodes >, SelfTest::Test< ModelBasePlugin, SimpleTreeManagerCreation >, SelfTest::Test< ModelBasePlugin, ModificationNotificationTests >, SelfTest::Test< InformationScriptingPlugin, SimpleTest >, SelfTest::Test< FilePersistencePlugin, SaveModeNodesSingleUnitOnly >, SelfTest::Test< FilePersistencePlugin, MoveInAndListChangesResolvable >, SelfTest::Test< FilePersistencePlugin, MoveChangeBetweenListsResolvable >, SelfTest::Test< FilePersistencePlugin, LoadModeNodesSingleUnitOnly >, SelfTest::Test< ContractsLibraryPlugin, ContractsLibraryTest >, SelfTest::Test< OOModelPlugin, SimpleClassTest >, SelfTest::Test< ModelBasePlugin, UndoRedoTextSet >, SelfTest::Test< FilePersistencePlugin, BothChangeSameList_Conflicts >, SelfTest::Test< ExportPlugin, ExportAndDeleteDir >, SelfTest::Test< CommentsPlugin, CommentsTest >, SelfTest::Test< FilePersistencePlugin, stmtEdit >, SelfTest::Test< ModelBasePlugin, RemoveOptional >, SelfTest::Test< FilePersistencePlugin, addAndRename >, SelfTest::Test< FilePersistencePlugin, LoadRootOnly >, SelfTest::Test< FilePersistencePlugin, LoadMultipleUnits >, SelfTest::Test< ModelBasePlugin, ListRemoval >, SelfTest::Test< FilePersistencePlugin, TwoDeletesInSameListResolvable >, SelfTest::Test< FilePersistencePlugin, TwoChangesSameList_DelInsNodes >, SelfTest::Test< FilePersistencePlugin, TwoChangesSameList >, SelfTest::Test< FilePersistencePlugin, SavingTypedList >, SelfTest::Test< FilePersistencePlugin, ListsReorderInsertDeleteResolvable >, SelfTest::Test< ExportPlugin, ExportAndDeleteFile >, SelfTest::Test< OOInteractionPlugin, SimpleTest >, SelfTest::Test< ModelBasePlugin, PersistenceSave >, SelfTest::Test< ModelBasePlugin, CompositeMetaData >, SelfTest::Test< FilePersistencePlugin, typeChange >, SelfTest::Test< FilePersistencePlugin, TwoChangesDifferentLists >, SelfTest::Test< FilePersistencePlugin, MoveCycleSimple >, SelfTest::Test< FilePersistencePlugin, TwoChangesDifferentLists_LabelCycle >, SelfTest::Test< ControlFlowVisualizationPlugin, SimpleTest >, SelfTest::Test< CodeReviewPlugin, SimpleTest >, SelfTest::Test< OOModelPlugin, JavaLibraryAndHelloWorldTest >, SelfTest::Test< ModelBasePlugin, VisitorSample >, SelfTest::Test< ModelBasePlugin, ProperRegistration >, SelfTest::Test< ModelBasePlugin, PositionExtension >, SelfTest::Test< FilePersistencePlugin, parentChange >, SelfTest::Test< FilePersistencePlugin, TwoDeletesNoConflict >, SelfTest::Test< FilePersistencePlugin, SaveMultipleUnits >, SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveMove >, SelfTest::Test< ExportPlugin, ExportAndModify >, SelfTest::Test< VersionControlUIPlugin, SimpleTest >, SelfTest::Test< FilePersistencePlugin, UnorderedAndUnitsConflicting >, SelfTest::Test< FilePersistencePlugin, EvalMethodInsert >, SelfTest::Test< FilePersistencePlugin, EvalLoopFix >, SelfTest::Test< FilePersistencePlugin, EvalClassMove >, SelfTest::Test< ExportPlugin, ExportIdentical >, SelfTest::Test< CppExportPlugin, SimpleTest >, SelfTest::Test< ModelBasePlugin, UndoRedoGroupTextSet >, SelfTest::Test< ModelBasePlugin, ListCreation >, SelfTest::Test< FilePersistencePlugin, SingleVersionChange >, SelfTest::Test< FilePersistencePlugin, MoveChangeBySingleVersion >, SelfTest::Test< FilePersistencePlugin, LoadingTypedList >, SelfTest::Test< FilePersistencePlugin, AtomicCycleMoveIns >, SelfTest::Test< VisualizationBasePlugin, CompositeTest >, SelfTest::Test< OOVisualizationPlugin, JavaLibraryAndHelloWorldTest >, SelfTest::Test< FilePersistencePlugin, listReorder >, SelfTest::Test< FilePersistencePlugin, PasteInListFromClipboard >, SelfTest::Test< FilePersistencePlugin, LoadingFullList >, SelfTest::Test< FilePersistencePlugin, TwoChangesSameList_LabelCycleResolvable >, SelfTest::Test< ExportPlugin, CompositeFragmentTest >, and SelfTest::Test< AlloyPlugin, AlloyTest >.

Member Data Documentation

◆ name

QString SelfTest::TestBase::name
private