OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <string> | |
not at google - send to devlin
2013/09/18 19:48:31
just features_unittest.cc
dhnishi (use Chromium)
2013/09/18 22:00:23
Done.
| |
6 | |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 #include "tools/json_schema_compiler/test/test_permission_features.h" | |
9 | |
10 using test::features::PermissionFeatures; | |
11 | |
12 TEST(FeaturesGeneratorTest, FromString) { | |
13 PermissionFeatures test_features = PermissionFeatures(); | |
not at google - send to devlin
2013/09/18 19:48:31
just
PermissionFeatures test_features;
same belo
dhnishi (use Chromium)
2013/09/18 22:00:23
Done.
| |
14 ASSERT_EQ(PermissionFeatures::kSimple, test_features.FromString("simple")); | |
15 ASSERT_EQ(PermissionFeatures::kComplex, test_features.FromString("complex")); | |
not at google - send to devlin
2013/09/18 19:48:31
for all, prefer EXPECT over ASSERT.
dhnishi (use Chromium)
2013/09/18 22:00:23
Done.
| |
16 } | |
17 | |
18 TEST(FeaturesGeneratorTest, ToString) { | |
19 PermissionFeatures test_features = PermissionFeatures(); | |
20 ASSERT_EQ("simple", | |
21 std::string(test_features.ToString(PermissionFeatures::kSimple))); | |
22 ASSERT_EQ("complex", | |
23 std::string(test_features.ToString(PermissionFeatures::kComplex))); | |
not at google - send to devlin
2013/09/18 19:48:31
EXPECT_STREQ, no std::string-ifying.
dhnishi (use Chromium)
2013/09/18 22:00:23
Done.
| |
24 } | |
OLD | NEW |