diff options
| author | 2019-12-25 03:48:11 +0100 | |
|---|---|---|
| committer | 2019-12-25 03:48:11 +0100 | |
| commit | 825bcda767d2bab9f470d81cd76b9e5985fbea9c (patch) | |
| tree | d117fe3469822f4bac31725beec5793abf332c4a /tests | |
| parent | adf9031cf7ddf06d8806a2b8e4494984a21608b5 (diff) | |
| download | OneRoll-825bcda767d2bab9f470d81cd76b9e5985fbea9c.tar.gz OneRoll-825bcda767d2bab9f470d81cd76b9e5985fbea9c.zip | |
Fix test of IF
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dice/tst_dice.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/dice/tst_dice.cpp b/tests/dice/tst_dice.cpp index 98dcdc1..8d6c1ad 100644 --- a/tests/dice/tst_dice.cpp +++ b/tests/dice/tst_dice.cpp @@ -850,7 +850,11 @@ void TestDice::ifTest() node.run(nullptr); - auto text= dynamic_cast<StringResult*>(ifNode.getNextNode()->getResult())->getText(); + QString text; + if(nullptr != ifNode.getNextNode()) + text= dynamic_cast<StringResult*>(ifNode.getNextNode()->getResult())->getText(); + else + text= dynamic_cast<StringResult*>(ifNode.getResult())->getText(); QCOMPARE(expectedResult, text); |