Peter Kasting
a1851e8fbb
Fixes for re-enabling more MSVC level 4 warnings: angle/ edition
...
This contains fixes for the following sorts of issues:
* Signedness mismatch
BUG=81439
TEST=none
Change-Id: Ief116d4b79b63479641259119246bb1465bbfd1f
Reviewed-on: https://chromium-review.googlesource.com/207418
Reviewed-by: Alok Priyadarshi <[email protected] >
Tested-by: Geoff Lang <[email protected] >
2014-07-15 13:17:37 +00:00
Jamie Madill
37f77d2e1a
Fixes to the standalone Linux build.
...
Several small build errors present on Linux cropped up due to
different warning flags and platform quirks.
BUG=angle:627
Change-Id: If8f651cacf05bb06ecb129be47b12729ccc3f69b
Reviewed-on: https://chromium-review.googlesource.com/197724
Reviewed-by: Shannon Woods <[email protected] >
Reviewed-by: Geoff Lang <[email protected] >
Tested-by: Jamie Madill <[email protected] >
2014-05-01 15:36:13 +00:00
Geoff Lang
a8ff8855d2
Fix signed/unsigned comparison warning.
...
BUG=angle:560
Change-Id: I9d0e8ce01db91a828bc7ae2da74c8ddce60f0184
Reviewed-on: https://chromium-review.googlesource.com/196192
Reviewed-by: Shannon Woods <[email protected] >
Tested-by: Geoff Lang <[email protected] >
2014-04-22 18:20:01 +00:00
Geoff Lang
1deca4fd84
Don't include the test main files in the source listings.
...
Since chrome adds the ANGLE test source directly to it's own projects,
the main function is defined twice. Remove the main file from the source
listings and only add it for our test executables.
BUG=angle:568
Change-Id: I30b481a23d5de80341d7f339583a43ad2f4391bb
Reviewed-on: https://chromium-review.googlesource.com/195345
Reviewed-by: Jamie Madill <[email protected] >
Reviewed-by: Shannon Woods <[email protected] >
Tested-by: Geoff Lang <[email protected] >
2014-04-17 15:03:44 +00:00
Jamie Madill
236be22188
Add in gypi scripts for preprocessor and compiler tests.
...
Chromium directly includes our .gypi files in its own standalone
tests, hence we need to keep files where it looks for includes.
Previously we had removed the gypi files with the new project
structures.
BUG=angle:568
Change-Id: I2cf87bdd3d9635ca8e58b991b9a3e55e00261851
Reviewed-on: https://chromium-review.googlesource.com/187650
Reviewed-by: Zhenyao Mo <[email protected] >
Reviewed-by: Shannon Woods <[email protected] >
Tested-by: Jamie Madill <[email protected] >
2014-02-25 20:48:02 +00:00
Shannon Woods
1bfaf78263
Merge preprocessor test changes from f84ef70bc7
...
Change-Id: I672f8b37f1e8189e43273abb59bce23ff1d580c1
Reviewed-on: https://chromium-review.googlesource.com/178994
Reviewed-by: Nicolas Capens <[email protected] >
Commit-Queue: Nicolas Capens <[email protected] >
Tested-by: Nicolas Capens <[email protected] >
2013-12-09 18:15:34 +00:00
Geoff Lang
a9b3e4c834
Fix enum names in preprocessor tests.
...
Change-Id: I6c08c43ecb2ad593119f85c05a802473348cafb7
Reviewed-on: https://chromium-review.googlesource.com/178430
Reviewed-by: Jamie Madill <[email protected] >
Reviewed-by: Nicolas Capens <[email protected] >
Commit-Queue: Nicolas Capens <[email protected] >
Tested-by: Nicolas Capens <[email protected] >
2013-11-28 19:53:02 +00:00
Geoff Lang
8622e55452
Merge 16a3eb3e9f from master.
...
Fix compiler test initialization issues.
We should call ShInitialize() / ShFinalize() once per process, so moving
them out of individual test's Setup() / Shutdown() to the test main().
BUG=
[email protected]
Review URL: https://codereview.appspot.com/13568048
2013-10-17 09:52:37 -04:00
shannon.woods%[email protected]
d2d198e37e
Fixed compile error for preprocessor tests.
...
Review URL: https://codereview.appspot.com/7388051
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2057 736b8ea6-26fd-11df-bfd4-992fa37f6226
2013-04-13 03:27:40 +00:00
[email protected]
c0a1eb3c46
Fixed compile error on android. It was complaining about tolower. This patch removes the usage of tolower, and adds tests for checking both versions of hexadecimal integers - 0x and 0X.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1195 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-07-09 18:27:04 +00:00
[email protected]
d0d9f87ac0
Make sure that #version occurs before anything else, except for comments and white space.
...
Review URL: https://codereview.appspot.com/6348056
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1184 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-07-03 16:06:40 +00:00
[email protected]
2e81891c21
Handled the case where int and float are of correct format, but large. The GLSL spec is not very clear on how integers should be interpreted for expressions. C99 says the expression is of type intmax_t. I am parsing all integers as int except those in expressions, which are being parsed as unsigned int.
...
Review URL: https://codereview.appspot.com/6351051
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1179 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-29 21:26:03 +00:00
[email protected]
5b6a68e04a
Replaced pp::Token::value with pp::Token::text. The term value will be used for a function which will convert text to integer/float constant.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1175 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-28 20:29:13 +00:00
[email protected]
fadc20586b
More expression tests for division by zero.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1171 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-28 19:21:44 +00:00
[email protected]
d39ec4c15d
Implemented conditional processing.
...
Review URL: https://codereview.appspot.com/6333046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1168 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-26 04:37:55 +00:00
[email protected]
73bc298e3f
Hooked up the new preprocessor behind a compile-time flag ANGLE_USE_NEW_PREPROCESSOR.
...
Review URL: https://codereview.appspot.com/6304095
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1158 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-19 18:48:05 +00:00
[email protected]
f3cdb460d1
Added support for pre-defined macros.
...
Review URL: https://codereview.appspot.com/6301084
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1157 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-19 18:39:48 +00:00
[email protected]
46aa13d87f
Implemented line directive.
...
Review URL: https://codereview.appspot.com/6307083
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1149 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-15 15:40:27 +00:00
[email protected]
7fc38dddd2
Implemented macro expansion.
...
Review URL: https://codereview.appspot.com/6303052
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1148 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-06-14 18:23:23 +00:00
[email protected]
c745adb0b2
Added PreprocessorTest::preprocess that preprocesses the input string and compares the output with that of the expected string. Renamed other *Test::preprocess methods to something different and clearer.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1126 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-31 18:10:43 +00:00
[email protected]
19d7aa60c6
Fixed the location of EOF token. Added three new location tests for EOF.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1125 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-31 17:34:05 +00:00
[email protected]
85a250ed59
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
2012-05-30 20:45:33 +00:00
[email protected]
484730bc6d
Removed the unnecessary usage of GTEST_HAS_PARAM_TEST and GTEST_HAS_COMBINE. I would rather have tests fail to compile than be silently ignored.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1098 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-30 20:13:14 +00:00
[email protected]
fc8b72005b
Refactored all tests to derive from a common PreprocessorTest. This avoids some code duplication.
...
Review URL: https://codereview.appspot.com/6257048
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1097 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-25 00:01:13 +00:00
[email protected]
e5dfefad46
Renamed UNEXPECTED_TOKEN_IN_DIRECTIVE to UNEXPECTED_TOKEN.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1096 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-24 19:29:37 +00:00
[email protected]
7c884540ad
Implemented #extension and #version directives.
...
Review URL: https://codereview.appspot.com/6242045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1095 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-24 19:13:03 +00:00
[email protected]
36124de8ce
Implemented #error and #pragma directives. Added new tests and updated old ones for the new preprocessor API.
...
Review URL: https://codereview.appspot.com/6213066
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1094 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-24 02:17:43 +00:00
[email protected]
07d921de02
Token::value now contains text for all types of tokens - not just CONST_INT, CONST_FLOAT, and IDENTIFIER. This makes it easier to report diagnostics and various preprocessor directives.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1093 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-22 20:22:08 +00:00
[email protected]
99b5c0c91e
Fixed compile errors and warnings on linux.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1088 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-17 20:44:52 +00:00
[email protected]
2c958eefb7
Moved error-handling to a separate class - Diagnostics. We were earlier returning errors as tokens which did not work very well when error occured while parsing a preprocessor directive. Now all returned tokens are valid. Errors are reported via an abstract Diagnostics interface. Updated unit-tests with the new scheme.
...
Review URL: https://codereview.appspot.com/6203089
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1087 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-17 20:35:42 +00:00
[email protected]
98eec91296
Using yy_scan_string, which flushes the old buffer does not work. GLSL requires that each input string is concatenated, but yy_scan_string treats each string individually. Added a custom YY_INPUT which maintains the continuity between each string.
...
Review URL: https://codereview.appspot.com/6130045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1066 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-05-01 10:04:08 +00:00
[email protected]
151e766c96
Added operator test.
...
Review URL: https://codereview.appspot.com/6129055
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1065 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-30 19:01:06 +00:00
[email protected]
a11a6ab802
Changes to handle comments properly and associated tests.
...
Review URL: https://codereview.appspot.com/6111059
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1059 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-27 10:00:38 +00:00
[email protected]
128d91995c
Added tests for token location.
...
Review URL: https://codereview.appspot.com/6118062
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1058 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-26 22:39:21 +00:00
[email protected]
828cc4897d
Replaced Token::Location::string with Token::Location::file.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1056 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-26 19:41:07 +00:00
[email protected]
aaf756962c
Fixed the usage of testing::Range. I was assuming that the range is closed interval, i.e., it includes the max value. But it does not.
...
Review URL: https://codereview.appspot.com/6112055
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1054 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-25 20:44:28 +00:00
[email protected]
2818248576
Drastically simplified Input class. Now most of the heavy lifting is done by in-built yy_scan_string and yy_scan_bytes. Comment handling will be done by the lexer.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1051 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-24 23:07:34 +00:00
[email protected]
23ff36a03d
Added tests for the whole character set.
...
Review URL: https://codereview.appspot.com/6105044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1050 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-23 19:27:35 +00:00
[email protected]
78a3519876
Added a catch-rule for invalid numbers.
...
Note that we do not need such a rule for identifiers because they will always be either terminated by a space, a punctuator, or an invalid character. Space and punctuator are both valid cases. The invalid character will be caught by another rule specifically for invalid characters. I will cover this case when I add tests for valid character set.
Review URL: https://codereview.appspot.com/5978048
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1047 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-19 17:16:26 +00:00
[email protected]
1023bb5599
Added tests for identifiers.
...
Review URL: https://codereview.appspot.com/6038043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1042 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-14 09:04:46 +00:00
[email protected]
36cc18b718
Added tests for number types.
...
Review URL: https://codereview.appspot.com/6022045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1040 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-13 22:04:07 +00:00
[email protected]
d089d11864
Removed unnecessary includion of Token.h in various files.
...
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1037 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-13 17:05:12 +00:00
[email protected]
d5bb405f54
Added tests for pp::Token interface and white-space handling by the preprocessor. By the magic of test-case generators, we have 74 tests!
...
Review URL: https://codereview.appspot.com/6009054
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1036 736b8ea6-26fd-11df-bfd4-992fa37f6226
2012-04-13 15:44:20 +00:00