Lei Zhang
1a0334edee
Run clang-format to enforce Google style globally.
...
Note that we are more strict than Google style for one aspect:
pointer/reference indicators are adjacent to their types, not
their variables.
find . -name "*.h" -exec clang-format -i {} \;
find . -name "*.cpp" -exec clang-format -i {} \;
2015-11-10 15:56:47 -05:00
Lei Zhang
b36e704a47
Use spirv.h instead of spirv.hpp.
...
This is a part of the effort to make libspirv.h C-compatible.
2015-11-02 13:52:20 -05:00
Dejan Mircevski
d062f8b097
Make compilation input strings const.
...
Also rerun clang-format.
2015-10-26 12:55:33 -04:00
Dejan Mircevski
d2c81cf34a
Negative test for SourceLanguage.
...
Also, use "class" instead of "type" in the coverage CSV.
2015-10-26 12:55:33 -04:00
David Neto
0cd7352d7d
Use 3-arg MakeInstruction to reduce logic in tests
...
Avoids open-coded vector inserts and two variables in various
tests. Should improve readability.
2015-10-26 12:55:33 -04:00
David Neto
54b2ea1088
Assembler test for optional operands of OpSource
...
These are the first tests to cover OperandOptionalId
and OperandOptionalLiteralString from the grammar in
opcode.inc
2015-10-26 12:55:33 -04:00
David Neto
212bafe4da
Assembler tests for remaining Debug instructions
...
OpString, OpName, OpMemberName, OpLine, OpNoLine,
OpSourceContinued.
2015-10-26 12:55:33 -04:00
Lei Zhang
a66952d38c
Remove executable file mode bits on source files.
2015-10-26 12:55:33 -04:00
David Neto
1b5fd4962e
Put the test fixture into spvtest namespace.
...
All test utility code should go into the spvtest namespace.
2015-10-26 12:55:33 -04:00
David Neto
d1dd2fbd7c
Put const back on const char* in test case structs
2015-10-26 12:55:33 -04:00
Andrew Woloszyn
f2d0775f1b
A bunch of small fixes to build in MSVC2013.
...
Fixed an issue where some of the tests were testing
the wrong word with the wrong operation. (| != ||).
Coalesced the many versions of EnumCase into one.
Added a get_value() to EnumCase to convert to a uint32_t.
Replaces ASSERT_TRUE(pointer), with ASSERT_NE(nullptr, pointer),
so that we do not do implicit pointer->bool conversion.
Removed const from some test structs since gtest needs to be
able to swap them.
2015-10-26 12:55:33 -04:00
David Neto
a08350a2c3
Assembler test for OpSourceExtension.
...
Add test utility function MakeVector(std::string) to encode
a string as a vector of 32-bit words, as per the SPIR-V literal
string encoding.
2015-10-26 12:54:39 -04:00
David Neto
08d89bb7a5
Test assembly of OpSource using all language enums
...
Adds a file to test assembly of instructions in the "Debug" section
of the SPIR-V spec.
2015-10-26 12:54:39 -04:00