Repository: microsoft/terminal
File: src/til/ut_til/EnumSetTests.cpp (C++)

Code before:

    TEST_METHOD(SetResetFlipMethods)
    {
        enum class Flags
        {
            Zero,
            One,
            Two,
            Three,
            Four
        };

        Log::Comment(L"Start with no bits set");
        til::enumset<Flags> flags;
        VERIFY_ARE_EQUAL(0b00000u, flags.bits());

        Log::Comment(L"Set bit 2 to true");
        flags.set(Flags::Two);
        VERIFY_ARE_EQUAL(0b00100u, flags.bits());

        Log::Comment(L"Flip bit 4 to true");
        flags.flip(Flags::Four);
        VERIFY_ARE_EQUAL(0b10100u, flags.bits());

        Log::Comment(L"Set bit 0 to true");
        flags.set(Flags::Zero);
        VERIFY_ARE_EQUAL(0b10101u, flags.bits());

        Log::Comment(L"Reset bit 2 to false, leaving 0 and 4 true");
        flags.reset(Flags::Two);
        VERIFY_ARE_EQUAL(0b10001u, flags.bits());

        Log::Comment(L"Set bit 0 to false, leaving 4 true");
        flags.reset(Flags::Zero);
        VERIFY_ARE_EQUAL(0b10000u, flags.bits());

        Log::Comment(L"Flip bit 4, leaving all bits false ");
        flags.flip(Flags::Four);
        VERIFY_ARE_EQUAL(0b00000u, flags.bits());

        Log::Comment(L"Set bits 0, 3, and 2");
        flags.set(Flags::Zero, Flags::Three, Flags::Two);
        VERIFY_ARE_EQUAL(0b01101u, flags.bits());

        Log::Comment(L"Reset bits 3, 4 (already reset), and 0, leaving 2 true");
        flags.reset(Flags::Three, Flags::Four, Flags::Zero);
        VERIFY_ARE_EQUAL(0b00100u, flags.bits());
    }

    TEST_METHOD(TestMethods)
    {

Review comment (suggestion):
As above, technically this should now be:
```
flags.set(Flags::Zero, true);
```

Code after:

    TEST_METHOD(SetResetFlipMethods)
    {
        enum class Flags
        {
            Zero,
            One,
            Two,
            Three,
            Four
        };

        Log::Comment(L"Start with no bits set");
        til::enumset<Flags> flags;
        VERIFY_ARE_EQUAL(0b00000u, flags.bits());

        Log::Comment(L"Set bit 2 to true");
        flags.set(Flags::Two);
        VERIFY_ARE_EQUAL(0b00100u, flags.bits());

        Log::Comment(L"Flip bit 4 to true");
        flags.flip(Flags::Four);
        VERIFY_ARE_EQUAL(0b10100u, flags.bits());

        Log::Comment(L"Set bit 0 to true");
        flags.set(Flags::Zero, true);
        VERIFY_ARE_EQUAL(0b10101u, flags.bits());

        Log::Comment(L"Reset bit 2 to false, leaving 0 and 4 true");
        flags.reset(Flags::Two);
        VERIFY_ARE_EQUAL(0b10001u, flags.bits());

        Log::Comment(L"Set bit 0 to false, leaving 4 true");
        flags.set(Flags::Zero, false);
        VERIFY_ARE_EQUAL(0b10000u, flags.bits());

        Log::Comment(L"Flip bit 4, leaving all bits false ");
        flags.flip(Flags::Four);
        VERIFY_ARE_EQUAL(0b00000u, flags.bits());

        Log::Comment(L"Set bits 0, 3, and 2");
        flags.set(Flags::Zero, Flags::Three, Flags::Two);
        VERIFY_ARE_EQUAL(0b01101u, flags.bits());

        Log::Comment(L"Reset bits 3, 4 (already reset), and 0, leaving 2 true");
        flags.reset(Flags::Three, Flags::Four, Flags::Zero);
        VERIFY_ARE_EQUAL(0b00100u, flags.bits());
    }

    TEST_METHOD(TestMethods)
    {