Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like using catch2 (c++ test framework). the keywords are only reused when they group together in the code.

    GIVEN("Some setup") {
        // code to create the setup
        WHEN("some use of the setup") {
            // do something
        }
        WHEN("something else"){
            // do something unrelated to the previous when
       }
    }


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: