svoid test_AllOnAll() { for (bool variation : falseTrue()) { new AllOnAll aoa; aoa.newA("one"); assertNullVerbose(aoa.next()); aoa.newB(1); assertEqualsVerbose(pair("one", 1), aoa.next()); assertNullVerbose(aoa.next()); aoa.newB(2); if (!variation) aoa.newA("two"); assertEqualsVerbose(pair("one", 2), aoa.next()); if (variation) { assertNullVerbose(aoa.next()); aoa.newA("two"); } assertEqualsVerbose(pair("two", 1), aoa.next()); assertEqualsVerbose(pair("two", 2), aoa.next()); assertNullVerbose(aoa.next()); } new AllOnAll aoa; aoa.newA("one"); aoa.newB(1); aoa.newA("two"); aoa.newB(2); assertEqualsVerbose(pair("one", 1), aoa.next()); assertEqualsVerbose(pair("two", 1), aoa.next()); assertEqualsVerbose(pair("one", 2), aoa.next()); assertEqualsVerbose(pair("two", 2), aoa.next()); assertNullVerbose(aoa.next()); }