LCOV - code coverage report
Current view: top level - tests - BIntegerTests.cpp (source / functions) Hit Total Coverage
Test: cpp-bencoding code coverage Lines: 11 11 100.0 %
Date: 2018-04-21 15:28:44 Functions: 12 13 92.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /**
       2             : * @file      BIntegerTests.cpp
       3             : * @copyright (c) 2014 by Petr Zemek (s3rvac@gmail.com) and contributors
       4             : * @license   BSD, see the @c LICENSE file for more details
       5             : * @brief     Tests for the BInteger class.
       6             : */
       7             : 
       8             : #include <gtest/gtest.h>
       9             : 
      10             : #include "BInteger.h"
      11             : 
      12             : namespace bencoding {
      13             : namespace tests {
      14             : 
      15             : using namespace testing;
      16             : 
      17           4 : class BIntegerTests: public Test {};
      18             : 
      19           5 : TEST_F(BIntegerTests,
      20             : ValueReturnsCorrectValueAfterCreation) {
      21           2 :     auto i = BInteger::create(5);
      22             : 
      23           1 :     EXPECT_EQ(5, i->value());
      24           1 : }
      25             : 
      26           5 : TEST_F(BIntegerTests,
      27             : ValueReturnsCorrectValueAfterSet) {
      28           2 :     auto i = BInteger::create(5);
      29           1 :     i->setValue(10);
      30             : 
      31           1 :     EXPECT_EQ(10, i->value());
      32           1 : }
      33             : 
      34             : } // namespace tests
      35           3 : } // namespace bencoding

Generated by: LCOV version 1.13