Also fix using declaration order.
Also put a few tests into the anonymous namespace.
#include "TestFixture.h"
using ::testing::Eq;
+using spvtest::AutoText;
namespace {
namespace {
using libspirv::AssemblyContext;
+using spvtest::AutoText;
TEST(TextAdvance, LeadingNewLines) {
AutoText input("\n\nWord");
#include <string>
+namespace {
+
using libspirv::AssemblyContext;
+using spvtest::AutoText;
TEST(TextStartsWithOp, YesAtStart) {
EXPECT_TRUE(
EXPECT_FALSE(
AssemblyContext(AutoText("%foo"), nullptr).isStartOfNewInst());
}
+
+} // anonymous namespace
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using spvtest::MakeVector;
using spvtest::TextToBinaryTest;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using ::testing::Eq;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using spvtest::TextToBinaryTest;
using ::testing::Eq;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
-using spvtest::TextToBinaryTest;;
+using spvtest::TextToBinaryTest;
using ::testing::Eq;
// Test OpFunction
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using ::testing::Eq;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using spvtest::TextToBinaryTest;
using ::testing::Eq;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using spvtest::MakeVector;
using ::testing::Eq;
namespace {
+using spvtest::EnumCase;
using spvtest::MakeInstruction;
using ::testing::Eq;
namespace {
-using spvtest::TextToBinaryTest;
using libspirv::AssemblyContext;
using libspirv::AssemblyGrammar;
+using spvtest::TextToBinaryTest;
+using spvtest::AutoText;
TEST(GetWord, Simple) {
EXPECT_EQ("", AssemblyContext(AutoText(""), nullptr).getWord());
namespace {
using libspirv::AssemblyContext;
+using spvtest::AutoText;
#define TAB "\t"
#define NEWLINE "\n"
#define I32_ENDIAN_HOST (o32_host_order.value)
// A namespace for utilities used in SPIR-V Tools unit tests.
-// TODO(dneto): Move other type declarations into this namespace.
namespace spvtest {
class WordVector;
return result;
}
-} // namespace spvtest
-
// A type for easily creating spv_text_t values, with an implicit conversion to
// spv_text.
struct AutoText {
std::vector<uint32_t> operands_;
};
+} // namespace spvtest
#endif