Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated commented test_main.cpp #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/test_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

//including library files
#include <hippomocks.h>
#include <catch/catch.hpp>

#include <consumer.h>

#ifdef _HIPPOMOCKS__ENABLE_CFUNC_MOCKING_SUPPORT

//defining the test case for failure
TEST_CASE("consumer: failure")
{
MockRepository mocks;
Expand All @@ -38,6 +38,7 @@ TEST_CASE("consumer: failure")

CHECK_THROWS(consumer{p});
}
//defining the test case for success

TEST_CASE("consumer: success")
{
Expand Down
7 changes: 4 additions & 3 deletions test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

//includeing library files
#include <catch/catch.hpp>

//main function
int unittest_main(int argc, char *argv[]);

//running test case
TEST_CASE("main: success")
{
//processing function
CHECK_NOTHROW(unittest_main(0, nullptr));
}