Index: gpu/command_buffer/service/shader_manager_unittest.cc |
diff --git a/gpu/command_buffer/service/shader_manager_unittest.cc b/gpu/command_buffer/service/shader_manager_unittest.cc |
index f927e269790382c6dbda7a21bd66f3572f036c65..30f87d7d48ebc3d28c31d3133e8011d8728e1370 100644 |
--- a/gpu/command_buffer/service/shader_manager_unittest.cc |
+++ b/gpu/command_buffer/service/shader_manager_unittest.cc |
@@ -245,6 +245,27 @@ TEST_F(ShaderManagerTest, ShaderInfoUseCount) { |
EXPECT_TRUE(info2 == NULL); |
} |
+TEST_F(ShaderManagerTest, StripComments) { |
+ const char* kSource = "" |
+ "// this is a single line comment\n" |
+ "this is not a comment\n" |
+ "/* this is\n" |
+ "a multi line\n" |
+ "comment */\n" |
+ "this is not a comment\n" |
+ "this is an /* inline */ comment"; |
+ const char* kExpected = "" |
+ " \n" |
+ "this is not a comment\n" |
+ "/*\n" |
+ "\n" |
+ "*/\n" |
+ "this is not a comment\n" |
+ "this is an /**/ comment"; |
+ std::string actual = ShaderManager::StripComments(kSource); |
+ EXPECT_STREQ(kExpected, actual.c_str()); |
+} |
+ |
} // namespace gles2 |
} // namespace gpu |