Index: test/Wrapper_Test.cpp |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/test/Wrapper_Test.cpp |
@@ -0,0 +1,38 @@ |
+#include <gtest/gtest.h> |
+#include "../src/plugin/Wrapper.h" |
+ |
+class Wrapper_Test |
+ : public ::testing::Test |
+{ |
+}; |
+ |
+namespace |
+{ |
+ void Unaltered( std::wstring url ) |
+ { |
+ std::wstring old = url ; |
+ Wrapper::Unescape_URL( url ); |
+ ASSERT_EQ( url, old ); |
+ } |
+ |
+ void Altered( std::wstring url, std::wstring unescaped ) |
+ { |
+ Wrapper::Unescape_URL( url ); |
+ ASSERT_EQ( url, unescaped ); |
+ } |
+} |
+ |
+TEST( Wrapper_Test, unaltered_01 ) |
+{ |
+ Unaltered( L"about:blank" ); |
+} |
+ |
+TEST( Wrapper_Test, unaltered_02 ) |
+{ |
+ Unaltered( L"http://url.com" ); |
+} |
+ |
+TEST( Wrapper_Test, altered_01 ) |
+{ |
+ Altered( L"http://url.com/url%20with%20space", L"http://url.com/url with space" ) ; |
+} |