LCOV - code coverage report
Current view: top level - test - mathextTests.cpp (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 12 12 100.0 %
Date: 2020-12-14 08:13:14 Functions: 12 12 100.0 %

          Line data    Source code
       1             : #include <gmock/gmock.h>
       2             : #include <gtest/gtest.h>
       3             : 
       4             : extern "C"
       5             : {
       6             : #include "mathext.h"
       7             : }
       8             : 
       9             : using namespace testing;
      10             : 
      11           2 : TEST(TestThatMathext,
      12             :      SgnFunctionReturnsNegativeOneWhenEvaluatedAtNegativeTwelve)
      13             : {
      14           1 :   ASSERT_THAT(sgn(-12.0), Eq(-1));
      15             : }
      16             : 
      17           2 : TEST(TestThatMathext,
      18             :      SgnFunctionReturnsPositiveOneWhenEvaluatedAtPositiveTwelve)
      19             : {
      20           1 :   ASSERT_THAT(sgn(12.0), Eq(1.0));
      21             : }
      22             : 
      23           2 : TEST(TestThatMathext, SgnFunctionReturnsZeroWhenEvaluatedAtZero)
      24             : {
      25           1 :   ASSERT_THAT(sgn(0.0), Eq(0.0));
      26             : }
      27             : 
      28           2 : TEST(TestThatMathext,
      29             :      SignFunctionReturnsTwelveWhenEvaluatedAtNegativeTwelveAndOne)
      30             : {
      31           1 :   ASSERT_THAT(sign(-12.0, 1.0), DoubleEq(12.0));
      32             : }
      33             : 
      34           2 : TEST(TestThatMathext,
      35             :      SignFunctionReturnsTwelveWhenEvaluatedAtNegativeTwelveAndZero)
      36             : {
      37           1 :   ASSERT_THAT(sign(-12.0, 0.0), DoubleEq(12.0));
      38             : }
      39             : 
      40           2 : TEST(
      41             :     TestThatMathext,
      42             :     SignFunctionReturnsNegativeTwelveWhenEvaluatedAtNegativeTwelveAndNegativeOne)
      43             : {
      44           1 :   ASSERT_THAT(sign(-12.0, -1.0), DoubleEq(-12.0));
      45             : }

Generated by: LCOV version 1.14