OLD | NEW |
(Empty) | |
| 1 #include <gtest/gtest.h> |
| 2 #include "../src/plugin/Wrapper.h" |
| 3 |
| 4 class Wrapper_Test |
| 5 : public ::testing::Test |
| 6 { |
| 7 }; |
| 8 |
| 9 namespace |
| 10 { |
| 11 void Unaltered( std::wstring url ) |
| 12 { |
| 13 std::wstring old = url ; |
| 14 Wrapper::Unescape_URL( url ); |
| 15 ASSERT_EQ( url, old ); |
| 16 } |
| 17 |
| 18 void Altered( std::wstring url, std::wstring unescaped ) |
| 19 { |
| 20 Wrapper::Unescape_URL( url ); |
| 21 ASSERT_EQ( url, unescaped ); |
| 22 } |
| 23 } |
| 24 |
| 25 TEST( Wrapper_Test, unaltered_01 ) |
| 26 { |
| 27 Unaltered( L"about:blank" ); |
| 28 } |
| 29 |
| 30 TEST( Wrapper_Test, unaltered_02 ) |
| 31 { |
| 32 Unaltered( L"http://url.com" ); |
| 33 } |
| 34 |
| 35 TEST( Wrapper_Test, altered_01 ) |
| 36 { |
| 37 Altered( L"http://url.com/url%20with%20space", L"http://url.com/url with space
" ) ; |
| 38 } |
OLD | NEW |