annotate libc/benchmarks/JSONTest.cpp @ 240:ca573705d418

merge
author matac
date Fri, 28 Jul 2023 20:50:09 +0900
parents 2e18cbf3894f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===-- JSON Tests --------------------------------------------------------===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #include "JSON.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #include "LibcBenchmark.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #include "LibcMemoryBenchmark.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 #include "llvm/Support/JSON.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #include "llvm/Support/raw_ostream.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #include "gmock/gmock.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 #include "gtest/gtest.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 using testing::AllOf;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 using testing::ExplainMatchResult;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 using testing::Field;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 using testing::Pointwise;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 namespace llvm {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 namespace libc_benchmarks {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 namespace {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 Study getStudy() {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 return Study{
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 "StudyName",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 Runtime{HostState{"CpuName",
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 123,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 {CacheInfo{"A", 1, 2, 3}, CacheInfo{"B", 4, 5, 6}}},
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 456, 789,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 BenchmarkOptions{std::chrono::seconds(1), std::chrono::seconds(2),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 10, 100, 6, 100, 0.1, 2, BenchmarkLog::Full}},
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 StudyConfiguration{std::string("Function"), 30U, false, 32U,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 std::string("Distribution"), Align(16), 3U},
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 {std::chrono::seconds(3), std::chrono::seconds(4)}};
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 static std::string serializeToString(const Study &S) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 std::string Buffer;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 raw_string_ostream RSO(Buffer);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 json::OStream JOS(RSO);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 serializeToJson(S, JOS);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 return Buffer;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 MATCHER(EqualsCacheInfo, "") {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 const CacheInfo &A = ::testing::get<0>(arg);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 const CacheInfo &B = ::testing::get<1>(arg);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 return ExplainMatchResult(AllOf(Field(&CacheInfo::Type, B.Type),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 Field(&CacheInfo::Level, B.Level),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 Field(&CacheInfo::Size, B.Size),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 Field(&CacheInfo::NumSharing, B.NumSharing)),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 A, result_listener);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 auto equals(const HostState &H) -> auto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 return AllOf(
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 Field(&HostState::CpuName, H.CpuName),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 Field(&HostState::CpuFrequency, H.CpuFrequency),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 Field(&HostState::Caches, Pointwise(EqualsCacheInfo(), H.Caches)));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 auto equals(const StudyConfiguration &SC) -> auto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 return AllOf(
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 Field(&StudyConfiguration::Function, SC.Function),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 Field(&StudyConfiguration::NumTrials, SC.NumTrials),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 Field(&StudyConfiguration::IsSweepMode, SC.IsSweepMode),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 Field(&StudyConfiguration::SweepModeMaxSize, SC.SweepModeMaxSize),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 Field(&StudyConfiguration::SizeDistributionName, SC.SizeDistributionName),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 Field(&StudyConfiguration::AccessAlignment, SC.AccessAlignment),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 Field(&StudyConfiguration::MemcmpMismatchAt, SC.MemcmpMismatchAt));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 auto equals(const BenchmarkOptions &BO) -> auto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 return AllOf(
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 Field(&BenchmarkOptions::MinDuration, BO.MinDuration),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 Field(&BenchmarkOptions::MaxDuration, BO.MaxDuration),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 Field(&BenchmarkOptions::InitialIterations, BO.InitialIterations),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 Field(&BenchmarkOptions::MaxIterations, BO.MaxIterations),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 Field(&BenchmarkOptions::MinSamples, BO.MinSamples),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 Field(&BenchmarkOptions::MaxSamples, BO.MaxSamples),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 Field(&BenchmarkOptions::Epsilon, BO.Epsilon),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 Field(&BenchmarkOptions::ScalingFactor, BO.ScalingFactor),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 Field(&BenchmarkOptions::Log, BO.Log));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 auto equals(const Runtime &RI) -> auto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 return AllOf(Field(&Runtime::Host, equals(RI.Host)),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 Field(&Runtime::BufferSize, RI.BufferSize),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 Field(&Runtime::BatchParameterCount, RI.BatchParameterCount),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 Field(&Runtime::BenchmarkOptions, equals(RI.BenchmarkOptions)));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 auto equals(const Study &S) -> auto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 return AllOf(Field(&Study::StudyName, S.StudyName),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 Field(&Study::Runtime, equals(S.Runtime)),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 Field(&Study::Configuration, equals(S.Configuration)),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 Field(&Study::Measurements, S.Measurements));
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 TEST(JsonTest, RoundTrip) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 const Study S = getStudy();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 const auto Serialized = serializeToString(S);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 auto StudyOrError = parseJsonStudy(Serialized);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 if (auto Err = StudyOrError.takeError())
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 EXPECT_FALSE(Err) << "Unexpected error : " << Err << "\n" << Serialized;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 const Study &Parsed = *StudyOrError;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 EXPECT_THAT(Parsed, equals(S)) << Serialized << "\n"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 << serializeToString(Parsed);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 TEST(JsonTest, SupplementaryField) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 "UnknownField": 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 EXPECT_EQ(toString(Failure.takeError()), "Unknown field: UnknownField");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 TEST(JsonTest, InvalidType) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 "Runtime": 1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 EXPECT_EQ(toString(Failure.takeError()), "Expected JSON Object");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 TEST(JsonTest, InvalidDuration) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 "Runtime": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 "BenchmarkOptions": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 "MinDuration": "Duration should be a Number"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 EXPECT_EQ(toString(Failure.takeError()), "Can't parse Duration");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 TEST(JsonTest, InvalidAlignType) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 "Configuration": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 "AccessAlignment": "Align should be an Integer"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 EXPECT_EQ(toString(Failure.takeError()), "Can't parse Align, not an Integer");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 TEST(JsonTest, InvalidAlign) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 "Configuration": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 "AccessAlignment": 3
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 EXPECT_EQ(toString(Failure.takeError()),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 "Can't parse Align, not a power of two");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 TEST(JsonTest, InvalidBenchmarkLogType) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 "Runtime": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 "BenchmarkOptions":{
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 "Log": 3
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 EXPECT_EQ(toString(Failure.takeError()),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 "Can't parse BenchmarkLog, not a String");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 TEST(JsonTest, InvalidBenchmarkLog) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 auto Failure = parseJsonStudy(R"({
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 "Runtime": {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 "BenchmarkOptions":{
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 "Log": "Unknown"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 )");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 EXPECT_EQ(toString(Failure.takeError()),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 "Can't parse BenchmarkLog, invalid value 'Unknown'");
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 } // namespace
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 } // namespace libc_benchmarks
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 } // namespace llvm