Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
fc697cc9
Commit
fc697cc9
authored
May 17, 2016
by
Lei Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several comments in GTest fixture.
parent
9af54c33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
Hlsl.FromFile.cpp
gtests/Hlsl.FromFile.cpp
+1
-1
TestFixture.h
gtests/TestFixture.h
+6
-9
No files found.
gtests/Hlsl.FromFile.cpp
View file @
fc697cc9
...
@@ -59,7 +59,7 @@ std::string FileNameAsCustomTestSuffix(
...
@@ -59,7 +59,7 @@ std::string FileNameAsCustomTestSuffix(
using
HlslCompileTest
=
GlslangTest
<::
testing
::
TestWithParam
<
FileNameEntryPointPair
>>
;
using
HlslCompileTest
=
GlslangTest
<::
testing
::
TestWithParam
<
FileNameEntryPointPair
>>
;
// Compiling HLSL to SPIR-V under Vulkan semantics. Expected to successfully
// Compiling HLSL to SPIR-V under Vulkan semantics. Expected to successfully
// generate SPIR-V.
// generate
both AST and
SPIR-V.
TEST_P
(
HlslCompileTest
,
FromFile
)
TEST_P
(
HlslCompileTest
,
FromFile
)
{
{
loadFileCompileAndCheck
(
GLSLANG_TEST_DIRECTORY
,
GetParam
().
fileName
,
loadFileCompileAndCheck
(
GLSLANG_TEST_DIRECTORY
,
GetParam
().
fileName
,
...
...
gtests/TestFixture.h
View file @
fc697cc9
...
@@ -129,14 +129,13 @@ public:
...
@@ -129,14 +129,13 @@ public:
}
}
// Checks the equality of |expected| and |real|. If they are not equal,
// Checks the equality of |expected| and |real|. If they are not equal,
// write
// write |real| to the given file named as |fname| if update mode is on.
// |real| to the given file named as |fname| if update mode is on.
void
checkEqAndUpdateIfRequested
(
const
std
::
string
&
expected
,
void
checkEqAndUpdateIfRequested
(
const
std
::
string
&
expected
,
const
std
::
string
&
real
,
const
std
::
string
&
real
,
const
std
::
string
&
fname
)
const
std
::
string
&
fname
)
{
{
// In order to output the message we want under proper circumstances,
we
// In order to output the message we want under proper circumstances,
// need the following operator<< stuff.
//
we
need the following operator<< stuff.
EXPECT_EQ
(
expected
,
real
)
EXPECT_EQ
(
expected
,
real
)
<<
(
GlobalTestSettings
.
updateMode
<<
(
GlobalTestSettings
.
updateMode
?
(
"Mismatch found and update mode turned on - "
?
(
"Mismatch found and update mode turned on - "
...
@@ -145,10 +144,8 @@ public:
...
@@ -145,10 +144,8 @@ public:
// Update the expected output file if requested.
// Update the expected output file if requested.
// It looks weird to duplicate the comparison between expected_output
// It looks weird to duplicate the comparison between expected_output
// and
// and stream.str(). However, if creating a variable for the comparison
// stream.str(). However, if creating a variable for the comparison
// result, we cannot have pretty print of the string diff in the above.
// result,
// we cannot have pretty print of the string diff in the above.
if
(
GlobalTestSettings
.
updateMode
&&
expected
!=
real
)
{
if
(
GlobalTestSettings
.
updateMode
&&
expected
!=
real
)
{
EXPECT_TRUE
(
WriteFile
(
fname
,
real
))
<<
"Flushing failed"
;
EXPECT_TRUE
(
WriteFile
(
fname
,
real
))
<<
"Flushing failed"
;
}
}
...
@@ -165,7 +162,7 @@ public:
...
@@ -165,7 +162,7 @@ public:
const
std
::
string
spirv
;
// Optional SPIR-V disassembly text.
const
std
::
string
spirv
;
// Optional SPIR-V disassembly text.
};
};
// Compiles and link
e
s the given source |code| of the given shader
// Compiles and links the given source |code| of the given shader
// |stage| into the given |target| under the given |semantics|. Returns
// |stage| into the given |target| under the given |semantics|. Returns
// a GlslangResult instance containing all the information generated
// a GlslangResult instance containing all the information generated
// during the process. If |target| is Target::Spirv, also disassembles
// during the process. If |target| is Target::Spirv, also disassembles
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment