#include <string>
-#include "gmock/gmock.h"
#include "TestFixture.h"
+#include "gmock/gmock.h"
namespace {
}
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpSourceTest,
- ::testing::ValuesIn(kLanguageCases),);
+ ::testing::ValuesIn(kLanguageCases), );
TEST_F(OpSourceTest, WrongLanguage) {
EXPECT_THAT(CompileFailure("OpSource xxyyzz 12345"),
// TODO(dneto): utf-8, quoting, escaping
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpSourceContinuedTest,
::testing::ValuesIn(std::vector<const char*>{
- "", "foo bar this and that"}),);
+ "", "foo bar this and that"}), );
// Test OpSourceExtension
// TODO(dneto): utf-8, quoting, escaping
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpSourceExtensionTest,
::testing::ValuesIn(std::vector<const char*>{
- "", "foo bar this and that"}),);
+ "", "foo bar this and that"}), );
TEST_F(TextToBinaryTest, OpLine) {
EXPECT_THAT(CompiledInstructions("OpLine %srcfile 42 99"),
// TODO(dneto): utf-8, quoting, escaping
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpStringTest,
::testing::ValuesIn(std::vector<const char*>{
- "", "foo bar this and that"}),);
+ "", "foo bar this and that"}), );
using OpNameTest =
spvtest::TextToBinaryTestBase<::testing::TestWithParam<const char*>>;
TEST_P(OpNameTest, AnyString) {
- // TODO(dneto): utf-8, quoting, escaping
const std::string input =
std::string("OpName %target \"") + GetParam() + "\"";
EXPECT_THAT(CompiledInstructions(input),
Eq(MakeInstruction(SpvOpName, {1}, MakeVector(GetParam()))));
}
-// TODO(dneto): utf-8, quoting, escaping
+// UTF-8, quoting, escaping, etc. are covered in the StringLiterals tests in
+// BinaryToText.Literal.cpp.
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpNameTest,
- ::testing::ValuesIn(std::vector<const char*>{
- "", "foo bar this and that"}),);
+ ::testing::Values("", "foo bar this and that"), );
using OpMemberNameTest =
spvtest::TextToBinaryTestBase<::testing::TestWithParam<const char*>>;
// TODO(dneto): utf-8, quoting, escaping
INSTANTIATE_TEST_CASE_P(TextToBinaryTestDebug, OpMemberNameTest,
::testing::ValuesIn(std::vector<const char*>{
- "", "foo bar this and that"}),);
+ "", "foo bar this and that"}), );
// TODO(dneto): Parse failures?