-
Notifications
You must be signed in to change notification settings - Fork 980
/
TEST.cc
38 lines (37 loc) · 1.03 KB
/
TEST.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#define CATCH_CONFIG_MAIN
#include "../Catch/single_include/catch.hpp"
#include "solution.h"
TEST_CASE("Maximal Rectangle", "[maximalRectangle]")
{
Solution s;
SECTION( "Example" )
{
std::unordered_set<std::string> uset{"Leet", "Code"};
REQUIRE( s.wordBreak("LeetCode", uset) );
}
SECTION( "CASE0" )
{
std::unordered_set<std::string> uset{"aaaa", "aaa"};
REQUIRE( s.wordBreak("aaaaaaa", uset) );
}
SECTION( "CASE1" )
{
std::unordered_set<std::string> uset{"a","b","bbb","bbbb"};
REQUIRE( s.wordBreak("bb", uset) );
}
SECTION( "CASE2" )
{
std::unordered_set<std::string> uset{"a"};
REQUIRE( s.wordBreak("a", uset) );
}
SECTION( "CASE3" )
{
std::unordered_set<std::string> uset{"go","goal","goals","special"};
REQUIRE( s.wordBreak("goalspecial", uset) );
}
SECTION( "CASE4" )
{
std::unordered_set<std::string> uset{"aaaa", "aa"};
REQUIRE_FALSE( s.wordBreak("aaaaaaa", uset) );
}
}