1// Copyright 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>
6
7#include "testing/gtest/include/gtest/gtest.h"
8#include "tools/json_schema_compiler/test/test_features.h"
9
10using test::features::TestFeatures;
11
12TEST(FeaturesGeneratorTest, FromString) {
13  TestFeatures test_features;
14  EXPECT_EQ(TestFeatures::kSimple, test_features.FromString("simple"));
15  EXPECT_EQ(TestFeatures::kComplex, test_features.FromString("complex"));
16}
17
18TEST(FeaturesGeneratorTest, ToString) {
19  TestFeatures test_features;
20  EXPECT_STREQ("simple", test_features.ToString(TestFeatures::kSimple));
21  EXPECT_STREQ("complex", test_features.ToString(TestFeatures::kComplex));
22}
23