Sha256: 8873617cabe9c4484b8ce9a1e5b573d5644263da2395d0fe4403000ccfccd207

Contents?: true

Size: 1.35 KB

Versions: 150

Compression:

Stored size: 1.35 KB

Contents

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

BOOST_AUTO_TEST_CASE(sentence_empty)
{
    BOOST_REQUIRE(!pangram::is_pangram(""));
}

#ifdef EXERCISM_RUN_ALL_TESTS
BOOST_AUTO_TEST_CASE(pangram_with_only_lower_case)
{
    BOOST_REQUIRE(pangram::is_pangram("the quick brown fox jumps over the lazy dog"));
}

BOOST_AUTO_TEST_CASE(missing_character_x)
{
    BOOST_REQUIRE(!pangram::is_pangram("a quick movement of the enemy will jeopardize five gunboats"));
}

BOOST_AUTO_TEST_CASE(another_missing_x)
{
    BOOST_REQUIRE(!pangram::is_pangram("the quick brown fish jumps over the lazy dog"));
}

BOOST_AUTO_TEST_CASE(pangram_with_underscores)
{
    BOOST_REQUIRE(pangram::is_pangram("the_quick_brown_fox_jumps_over_the_lazy_dog"));
}

BOOST_AUTO_TEST_CASE(pangram_with_numbers)
{
    BOOST_REQUIRE(pangram::is_pangram("the 1 quick brown fox jumps over the 2 lazy dogs"));
}

BOOST_AUTO_TEST_CASE(missing_letters_replaced_with_numbers)
{
    BOOST_REQUIRE(!pangram::is_pangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"));
}

BOOST_AUTO_TEST_CASE(pangram_with_mixed_case_and_punctuation)
{
    BOOST_REQUIRE(pangram::is_pangram("\"Five quacking Zephyrs jolt my wax bed.\""));
}

BOOST_AUTO_TEST_CASE(upper_and_lower_should_not_be_counted_seperately)
{
    BOOST_REQUIRE(!pangram::is_pangram("the quick brown fox jumps over with lazy FX"));
}
#endif

Version data entries

150 entries across 150 versions & 1 rubygems

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