@@ -54,21 +54,21 @@ TEST_F(TestCommon, testGetFunctionIdentifierFromPath)
5454
5555 path = www_directory + " \\ static\\ css\\ theme.dark.css" ;
5656 ra::filesystem::NormalizePath (path);
57- ASSERT_EQ (" themedarkcss " , bin2cpp::getFunctionIdentifierFromPath (path));
57+ ASSERT_EQ (" ThemedarkCss " , bin2cpp::getFunctionIdentifierFromPath (path));
5858
5959 // test running twice returns the same value
6060 path = www_directory + " \\ static\\ css\\ theme.dark.css" ;
6161 ra::filesystem::NormalizePath (path);
62- ASSERT_EQ (" themedarkcss " , bin2cpp::getFunctionIdentifierFromPath (path));
62+ ASSERT_EQ (" ThemedarkCss " , bin2cpp::getFunctionIdentifierFromPath (path));
6363
6464 // test with only a filename
65- ASSERT_EQ (" themedarkcss " , bin2cpp::getFunctionIdentifierFromPath (" theme.dark.css" ));
65+ ASSERT_EQ (" ThemedarkCss " , bin2cpp::getFunctionIdentifierFromPath (" theme.dark.css" ));
6666
6767 // test valid special characters
68- ASSERT_EQ (" hello_world_1234567890 " , bin2cpp::getFunctionIdentifierFromPath (" hello_world_1234567890" ));
68+ ASSERT_EQ (" Hello_world_1234567890 " , bin2cpp::getFunctionIdentifierFromPath (" hello_world_1234567890" ));
6969
7070 // test more invalid characters
71- ASSERT_EQ (" index1234bangdollars " , bin2cpp::getFunctionIdentifierFromPath (" index.1234.bang!.dollars$" ));
71+ ASSERT_EQ (" Index1234bangDollars " , bin2cpp::getFunctionIdentifierFromPath (" index.1234.bang!.dollars$" ));
7272}
7373
7474TEST_F (TestCommon, testGetUniqueFunctionIdentifierFromPath)
@@ -81,48 +81,47 @@ TEST_F(TestCommon, testGetUniqueFunctionIdentifierFromPath)
8181 path = www_directory + " \\ static\\ css\\ theme.dark.css" ;
8282 ra::filesystem::NormalizePath (path);
8383
84- ASSERT_EQ (" themedarkcss " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
84+ ASSERT_EQ (" ThemedarkCss " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
8585
8686 // test duplicates
87- ASSERT_EQ (" themedarkcss_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
88- ASSERT_EQ (" themedarkcss_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
89- ASSERT_EQ (" themedarkcss_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
90- ASSERT_EQ (" themedarkcss_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
91- ASSERT_EQ (" themedarkcss_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
87+ ASSERT_EQ (" ThemedarkCss_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
88+ ASSERT_EQ (" ThemedarkCss_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
89+ ASSERT_EQ (" ThemedarkCss_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
90+ ASSERT_EQ (" ThemedarkCss_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
91+ ASSERT_EQ (" ThemedarkCss_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
9292 }
9393
9494 // test behavior with files that ends with numbers
9595 {
9696 path = temp_directory + " \\ index.001" ;
9797 ra::filesystem::NormalizePath (path);
9898
99- ASSERT_EQ (" index001 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
99+ ASSERT_EQ (" Index001 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
100100
101101 // test duplicates
102- ASSERT_EQ (" index001_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
103- ASSERT_EQ (" index001_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
104- ASSERT_EQ (" index001_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
105- ASSERT_EQ (" index001_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
106- ASSERT_EQ (" index001_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
102+ ASSERT_EQ (" Index001_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
103+ ASSERT_EQ (" Index001_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
104+ ASSERT_EQ (" Index001_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
105+ ASSERT_EQ (" Index001_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
106+ ASSERT_EQ (" Index001_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path, tmp));
107107 }
108108
109109 // try to bug the system: get an identifier from a file which is already a duplicate identifer.
110- ASSERT_EQ (" themedarkcss_3_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (" themedarkcss_3 " , tmp));
110+ ASSERT_EQ (" ThemedarkCss_3_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (" ThemedarkCss_3 " , tmp));
111111
112112 // test getting duplicate identifiers because of invalid characters
113113 {
114114 path = www_directory + " \\ static\\ js" ;
115115 ra::filesystem::NormalizePath (path);
116116 path += slash;
117117
118- ASSERT_EQ (" jqueryjs " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " jquery.js" , tmp));
118+ ASSERT_EQ (" JqueryJs " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " jquery.js" , tmp));
119119
120120 // test duplicates
121- ASSERT_EQ (" jqueryjs_1" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j.query.js" , tmp));
122- ASSERT_EQ (" jqueryjs_2" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j!qu!ery.js" , tmp));
123- ASSERT_EQ (" jqueryjs_3" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j-query.js" , tmp));
124- ASSERT_EQ (" jqueryjs_4" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " jqu.er.y.js" , tmp));
125- ASSERT_EQ (" jqueryjs_5" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " jqueryjs" , tmp));
121+ ASSERT_EQ (" JqueryJs_1" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j.query.js" , tmp));
122+ ASSERT_EQ (" JqueryJs_2" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j!qu!ery.js" , tmp));
123+ ASSERT_EQ (" JqueryJs_3" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " j-query.js" , tmp));
124+ ASSERT_EQ (" JqueryJs_4" , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " jqu.er.y.js" , tmp));
126125 }
127126
128127 // test getting duplicates from different directories
@@ -131,14 +130,14 @@ TEST_F(TestCommon, testGetUniqueFunctionIdentifierFromPath)
131130 ra::filesystem::NormalizePath (path);
132131 path += slash;
133132
134- ASSERT_EQ (" indexhtml " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " index.html" , tmp));
133+ ASSERT_EQ (" IndexHtml " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " index.html" , tmp));
135134
136135 // test duplicates
137- ASSERT_EQ (" indexhtml_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " home" + slash + " index.html" , tmp));
138- ASSERT_EQ (" indexhtml_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " index.html" , tmp));
139- ASSERT_EQ (" indexhtml_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " how-to-create-a-web-site" + slash + " index.html" , tmp));
140- ASSERT_EQ (" indexhtml_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " contact" + slash + " index.html" , tmp));
141- ASSERT_EQ (" indexhtml_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " using-bin2cpp" + slash + " index.html" , tmp));
136+ ASSERT_EQ (" IndexHtml_1 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " home" + slash + " index.html" , tmp));
137+ ASSERT_EQ (" IndexHtml_2 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " index.html" , tmp));
138+ ASSERT_EQ (" IndexHtml_3 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " how-to-create-a-web-site" + slash + " index.html" , tmp));
139+ ASSERT_EQ (" IndexHtml_4 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " contact" + slash + " index.html" , tmp));
140+ ASSERT_EQ (" IndexHtml_5 " , bin2cpp::getUniqueFunctionIdentifierFromPath (path + " blog" + slash + " using-bin2cpp" + slash + " index.html" , tmp));
142141 }
143142}
144143
0 commit comments