23 void EitherTest::testBasicLeft ()
26 QCOMPARE (left.
IsLeft (),
true);
27 QCOMPARE (left.
IsRight (),
false);
30 bool hadCaught =
false;
35 catch (
const std::exception&)
39 QCOMPARE (hadCaught,
true);
42 void EitherTest::testBasicRight ()
45 QCOMPARE (right.IsLeft (),
false);
46 QCOMPARE (right.IsRight (),
true);
47 QCOMPARE (right.GetRight (), QString {
"foo" });
49 bool hadCaught =
false;
54 catch (
const std::exception&)
58 QCOMPARE (hadCaught,
true);
const L & GetLeft() const
const R & GetRight() const
Either< int, QString > SomeEither_t