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.180 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.179 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.178 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.177 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.176 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.175 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.174 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.173 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.172 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.171 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.170 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.169 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.167 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.166 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.165 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.164 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.163 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.162 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.161 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp
trackler-2.2.1.160 tracks/cpp/exercises/difference-of-squares/difference_of_squares_test.cpp