Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1110

Add REQUIRE_THROWS_AS_WITH_CODE test macro

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.0
    • Affects Version/s: None
    • Component/s: Testing
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The REQUIRE_THROWS_AS macro from the Catch testing framework allows tests to declare the type of the exception expected to be thrown in an expression. However, no mechanism exists for introspecting the error code associated with the exception thrown. Adding a macro such as REQUIRE_THROWS_AS_WITH_CODE would allow for easy creation of tests that fully verify the correctness of the exception thrown.

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: