Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/Wrapper_Test.cpp

Issue 5750789393874944: [IE] First round of ATL removal (Closed)
Patch Set: Created June 20, 2014, 9:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/plugin/Wrapper.cpp ('K') | « test/Util_Test.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" ) ;
+}
« src/plugin/Wrapper.cpp ('K') | « test/Util_Test.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld