Sha256: e1b299522599776749befa11be10fb226bf37418f0b22b2a67850d86fdda0128

Contents?: true

Size: 779 Bytes

Versions: 396

Compression:

Stored size: 779 Bytes

Contents

#include "difference_of_squares.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE(up_to_5)
{
    BOOST_REQUIRE_EQUAL(225, squares::square_of_sums(5));
    BOOST_REQUIRE_EQUAL(55, squares::sum_of_squares(5));
    BOOST_REQUIRE_EQUAL(170, squares::difference(5));
}

#if defined(EXERCISM_RUN_ALL_TESTS)
BOOST_AUTO_TEST_CASE(up_to_10)
{
    BOOST_REQUIRE_EQUAL(3025, squares::square_of_sums(10));
    BOOST_REQUIRE_EQUAL(385, squares::sum_of_squares(10));
    BOOST_REQUIRE_EQUAL(2640, squares::difference(10));
}

BOOST_AUTO_TEST_CASE(up_to_100)
{
    BOOST_REQUIRE_EQUAL(25502500, squares::square_of_sums(100));
    BOOST_REQUIRE_EQUAL(338350, squares::sum_of_squares(100));
    BOOST_REQUIRE_EQUAL(25164150, squares::difference(100));
}
#endif

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.118 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.117 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.116 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.115 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.114 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.113 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.111 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.110 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.109 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.108 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.107 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.106 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.105 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.104 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.103 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.102 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.101 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.100 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.99 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp