Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
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
angle
Commits
85a250ed
Commit
85a250ed
authored
May 30, 2012
by
alokp@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated VersionTest to use the same pattern as other tests.
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@1100
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
51b96855
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
version_test.cpp
tests/preprocessor_tests/version_test.cpp
+7
-9
No files found.
tests/preprocessor_tests/version_test.cpp
View file @
85a250ed
...
...
@@ -10,8 +10,10 @@
class
VersionTest
:
public
PreprocessorTest
{
protected
:
void
lex
(
)
void
preprocess
(
const
char
*
str
)
{
ASSERT_TRUE
(
mPreprocessor
.
init
(
1
,
&
str
,
NULL
));
pp
::
Token
token
;
mPreprocessor
.
lex
(
&
token
);
EXPECT_EQ
(
pp
::
Token
::
LAST
,
token
.
type
);
...
...
@@ -22,7 +24,6 @@ class VersionTest : public PreprocessorTest
TEST_F
(
VersionTest
,
Valid
)
{
const
char
*
str
=
"#version 200
\n
"
;
ASSERT_TRUE
(
mPreprocessor
.
init
(
1
,
&
str
,
NULL
));
using
testing
::
_
;
EXPECT_CALL
(
mDirectiveHandler
,
...
...
@@ -30,7 +31,7 @@ TEST_F(VersionTest, Valid)
// No error or warning.
EXPECT_CALL
(
mDiagnostics
,
print
(
_
,
_
,
_
)).
Times
(
0
);
lex
(
);
preprocess
(
str
);
}
TEST_F
(
VersionTest
,
CommentsIgnored
)
...
...
@@ -44,7 +45,6 @@ TEST_F(VersionTest, CommentsIgnored)
"/*foo*/"
"//foo"
"
\n
"
;
ASSERT_TRUE
(
mPreprocessor
.
init
(
1
,
&
str
,
NULL
));
using
testing
::
_
;
EXPECT_CALL
(
mDirectiveHandler
,
...
...
@@ -52,13 +52,12 @@ TEST_F(VersionTest, CommentsIgnored)
// No error or warning.
EXPECT_CALL
(
mDiagnostics
,
print
(
_
,
_
,
_
)).
Times
(
0
);
lex
(
);
preprocess
(
str
);
}
TEST_F
(
VersionTest
,
MissingNewline
)
{
const
char
*
str
=
"#version 200"
;
ASSERT_TRUE
(
mPreprocessor
.
init
(
1
,
&
str
,
NULL
));
using
testing
::
_
;
// Directive successfully parsed.
...
...
@@ -67,7 +66,7 @@ TEST_F(VersionTest, MissingNewline)
// Error reported about EOF.
EXPECT_CALL
(
mDiagnostics
,
print
(
pp
::
Diagnostics
::
EOF_IN_DIRECTIVE
,
_
,
_
));
lex
(
);
preprocess
(
str
);
}
struct
VersionTestParam
...
...
@@ -84,7 +83,6 @@ class InvalidVersionTest : public VersionTest,
TEST_P
(
InvalidVersionTest
,
Identified
)
{
VersionTestParam
param
=
GetParam
();
ASSERT_TRUE
(
mPreprocessor
.
init
(
1
,
&
param
.
str
,
NULL
));
using
testing
::
_
;
// No handleVersion call.
...
...
@@ -92,7 +90,7 @@ TEST_P(InvalidVersionTest, Identified)
// Invalid version directive call.
EXPECT_CALL
(
mDiagnostics
,
print
(
param
.
id
,
pp
::
SourceLocation
(
0
,
1
),
_
));
lex
(
);
preprocess
(
param
.
str
);
}
static
const
VersionTestParam
kParams
[]
=
{
...
...
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