diff options
author | 2016-05-09 05:06:43 -0800 | |
---|---|---|
committer | 2016-05-09 09:21:28 -0700 | |
commit | 3f6f9f07de9bc9487452cad64998d51cf6ca5a92 (patch) | |
tree | f828c47b01cbc5471cbdc42181f2b018d9dcde73 /tensorflow/core/example/feature_util_test.cc | |
parent | 6ff265ebae14586db5db623b7502ddbdbc8bbd12 (diff) |
Removing std::string qualification and adding requisite #includes.
Change: 121829401
Diffstat (limited to 'tensorflow/core/example/feature_util_test.cc')
-rw-r--r-- | tensorflow/core/example/feature_util_test.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tensorflow/core/example/feature_util_test.cc b/tensorflow/core/example/feature_util_test.cc index bcee0fb587..ed09234837 100644 --- a/tensorflow/core/example/feature_util_test.cc +++ b/tensorflow/core/example/feature_util_test.cc @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/core/example/example.pb.h" #include "tensorflow/core/platform/test.h" +#include "tensorflow/core/platform/types.h" namespace tensorflow { namespace { @@ -210,5 +211,21 @@ TEST(AppendFeatureValuesTest, StringValuesUsingInitializerList) { EXPECT_EQ("BAZ", tag_ro.Get(2)); } +TEST(AppendFeatureValuesTest, StringVariablesUsingInitializerList) { + Example example; + + string string1("FOO"); + string string2("BAR"); + string string3("BAZ"); + + AppendFeatureValues({string1, string2, string3}, "tag", &example); + + auto tag_ro = GetFeatureValues<string>("tag", example); + ASSERT_EQ(3, tag_ro.size()); + EXPECT_EQ("FOO", tag_ro.Get(0)); + EXPECT_EQ("BAR", tag_ro.Get(1)); + EXPECT_EQ("BAZ", tag_ro.Get(2)); +} + } // namespace } // namespace tensorflow |