Commit graph

86 commits

Author SHA1 Message Date
Wolfgang Bumiller
d631c517b6 forgot to add that one 2013-06-12 13:56:40 +02:00
Wolfgang Bumiller
ba781c53ef now a bare 'return;' is not required anymore if return has been assigned anywhere 2013-05-29 17:08:03 +02:00
Wolfgang Bumiller
a76702cb36 make sure missing return values still warn 2013-05-29 17:01:26 +02:00
Wolfgang Bumiller
5aba29006b return assignment factorial test 2013-05-29 16:58:18 +02:00
Dale Weiler
fd5506b376 Update test template. 2013-05-29 11:30:26 +00:00
Dale Weiler
1b71caa1fe Update man page 2013-05-29 11:29:52 +00:00
Dale Weiler
6d6a2efada Experimental support for implicit return assignments. This closes #107. To enable return assignment support use -freturn-assignments. This allows you to do the following in QC code. T name() { return = expr_eval_T; return; /* returns expr_eval_T */ }. It allows for concise code and to rid locals in functions. It also saves a tremendous amount of space since only types of certian globals need to be allocated for returns. 2013-05-29 11:13:42 +00:00
Dale Weiler
1077eb2061 Add expressions for builtins test 2013-04-25 17:39:05 +00:00
Wolfgang Bumiller
66305c676a Allow string concatenation in the parser as well, for now only for immediate strings and __FUNC__, maybe later -fpermissive or somethign could allow it on const-delcared string variables 2013-04-24 17:27:04 +02:00
Dale Weiler
a0f6b00a15 Shitty testsuite support for windows the hacky way because there exists no sane simple way of redirecting pipes without a heafty chunk of code. 2013-04-24 14:04:00 +00:00
Wolfgang Bumiller
1e9d3e43cb test for the simple __FUNC__ case 2013-04-24 11:22:29 +02:00
Wolfgang Bumiller
17996dee50 fix noreturn testcase descriptions... those were mixed up 2013-04-23 17:07:19 +02:00
Dale Weiler
96c0fa983d A more realistic preprocessor concatenation test. 2013-04-21 06:52:22 +00:00
Dale Weiler
6009e2b3ea Undo that fail 2013-04-21 06:46:54 +00:00
Dale Weiler
07e335fdb8 Better output on failure 2013-04-21 06:46:39 +00:00
Dale Weiler
e27eebe0f9 More preprocessor testsuite support and our first preprocessor test! 2013-04-21 06:36:52 +00:00
Dale Weiler
ea0e2c47d5 We don't need to specify "-should fail" because we print the type now (this also makes the description colum shorter) 2013-04-21 06:13:25 +00:00
Dale Weiler
9bb586fb5a Add floor to tests defs.qh 2013-03-09 05:46:08 +00:00
Dale Weiler
d8d78f61a7 Implemented "reverse" enum attribute, e.g enum : reverse { A, B, C, D } -> A,B,C,D = 3,2,1,0 2013-03-09 05:07:14 +00:00
Dale Weiler
b971ddec3a Implemented concept of enumeration attributes (can be further extended, but currently only "flag" is implemented as an attribute). An enumeration with a flag attribute will act as a "flagged enumeration", one that automatically handles exponentiation of the constants defined inside it, i.e enum : flag { A, B, C }, A,B,C will equal 2, 4, 8. 2013-03-08 08:01:45 +00:00
Dale Weiler
479f3b9343 Implemented __builtin_exp 2013-03-08 03:46:25 +00:00
Dale Weiler
12340a6bd0 Actually generate an ast_call for __builtin_pow for the ** operator, otherwise the operator yeilds a ast_function, making "a ** b" not work, but since it's a function, allows **(a, b). Also added tests for exponentiation operator. 2013-03-07 23:05:40 +00:00
Wolfgang Bumiller
a32f59b256 hopefully fix an off-by-1 vararg copy issue 2013-02-26 16:39:28 +01:00
Dale Weiler
1e60bafcdc Aliases to aliases is a bad idea, revert. Added better tests to show unused aliases 2013-02-06 09:28:42 +00:00
Dale Weiler
e464cc1ea6 Implemented generalized attribute aliases. You can now alias functions, locals, or globals with [[alias("old_name")]] type new_name; 2013-02-06 05:30:09 +00:00
Dale Weiler
9cff2f7b8a perl ops -> pops 2013-02-05 17:15:28 +00:00
Dale Weiler
b3e87c3280 ast referencing 2013-02-05 17:14:56 +00:00
Dale Weiler
fed0f8b6b4 Work in progress <=> operator. 2013-02-05 16:34:03 +00:00
Dale Weiler
9bf8f9c505 Add bitnot test for testsuite. 2013-02-02 00:12:46 +00:00
Dale Weiler
a1fac66587 Added definition file for test-suite, used by default by the test system. To override the defs globally, use -defs=file from the command line for the test-suite. To override the defs per-file, use F: -no-defs flag in the test template file. 2013-01-30 08:04:56 +00:00
Dale Weiler
b9fcd64a1f Spiceing up the __VA_ARGS__ test 2013-01-27 13:05:01 +00:00
Dale Weiler
6fc5b32123 Fix warning, and better tests for __VA_ARGS__ 2013-01-27 13:03:02 +00:00
Dale Weiler
b4fbba5708 Implement subscripting for __VA_ARGS__, and added test-case. This only works on INTCONST for now. 2013-01-27 12:55:56 +00:00
Dale Weiler
531fbaf28c Remove user-defined success/failure messages for the testsuite. Instead print an aligned to console string containing the tmpl file name. This closes #90. 2013-01-27 08:39:42 +00:00
Wolfgang Bumiller
62af1659eb adding testcase for various parentheses and ternary combinations which to test the newly refactored code; includes some cases not hit by xonotic 2013-01-18 15:22:53 +01:00
Wolfgang Bumiller
8697fa59f3 Added counter-stability test to the varargs testcase 2013-01-17 10:32:43 +01:00
Wolfgang Bumiller
a5029a510a test for vec/float 2013-01-13 20:49:27 +01:00
Wolfgang Bumiller
61b777f575 vararg testcases 2013-01-12 16:37:26 +01:00
Dale Weiler
f6197a965c Better enumeration test 2013-01-10 20:50:42 +00:00
Wolfgang Bumiller
4a063d3518 enum testcase 2013-01-10 21:38:32 +01:00
Wolfgang Bumiller
16e789419d testcase for mul_vf/fv 2013-01-08 21:55:34 +01:00
Wolfgang Bumiller
3f3ed9b6f0 added a testcase for -Olocal-temps 2013-01-07 19:09:15 +01:00
Dale Weiler
a421d9a33b Implemented computed goto + added goto test for testsuite (tests both normal and computed goto statements). 2013-01-02 21:32:57 +00:00
Wolfgang Bumiller
8331a2982d tests for __VA_ARGS__ 2013-01-02 14:16:42 +01:00
Wolfgang Bumiller
9315577be6 noref testcase must use -Wno-uninitialized-global 2012-12-28 19:09:06 +01:00
Wolfgang Bumiller
fcdff3180a Tests for the previous vector-liferange change 2012-12-24 12:43:16 +01:00
Wolfgang Bumiller
041f8a86d7 utf8 tests 2012-12-23 10:23:42 +01:00
Wolfgang Bumiller
eb952f1199 fix -fshort-logic to cast to true boolean values 2012-12-22 20:05:15 +01:00
Wolfgang Bumiller
7cf0ba5aa8 'noreturn' is now an attribute and parsed as [[noreturn]] 2012-12-22 18:09:56 +01:00
Wolfgang Bumiller
949cd9bb06 Test cases for -fcorrect-logic 2012-12-22 17:55:55 +01:00