[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]
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]
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]
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]
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]
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]
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]
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]
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