Martin Carlberg
595736b8c6
Fixed: When selector is only a ':' in a send message statement the new compiler crashed.
...
The program below crashed on the last line with a 'null is not an object' error message. Also added a test case.
@implementation MyObject {
- (int):(int)a {
return a;
}
@end
var a = [[MyObject alloc] init];
var b = [a:3];
2013-05-30 14:39:58 +02:00
Martin Carlberg
a2257dab8f
New: Empty loop test cases for compiler generator
2013-05-22 11:41:17 +02:00
Alexander Ljungberg
8c5015a0bc
Test: verify compiler output for return statement without space.
...
Refs #1830 .
2013-05-18 01:00:49 +01:00
Alexander Ljungberg
302138c257
Fixed: OutputTest reversed expectation and test value in error messages.
...
The message would read "expected x but was y", where y would actually be the correct expected value and x the wrong one.
2013-05-18 00:59:20 +01:00
Alexander Ljungberg
de1d6aad9c
Test: check compiler output for selectors with keywords in them.
...
Refs #1929 .
2013-05-16 14:17:31 -07:00
Alexander Ljungberg
1d1016f08e
Test: reactivate the regex-simple-char-classes test.
...
This test failed with the old preprocessor but works fine now with the new compiler.
Refs #1929 .
2013-05-16 11:15:03 -07:00
Martin Carlberg
392aafb360
Revert "Revert "New: Added test cases for some preprocess directives in OutputTest.j""
...
This reverts commit 5e6c89ca8b .
Conflicts:
Tests/Objective-J/Preprocessor/OutputTests/OutputTest.j
2013-05-16 12:05:57 +02:00
Martin Carlberg
256c5b83da
Fixed: Typo, changed comma to semicolon
2013-05-15 15:35:03 +02:00
Martin Carlberg
5e6c89ca8b
Revert "New: Added test cases for some preprocess directives in OutputTest.j"
...
This reverts commit 9b709b85a9 .
2013-05-15 15:21:49 +02:00
Martin Carlberg
9b709b85a9
New: Added test cases for some preprocess directives in OutputTest.j
...
Also fixed so OutputTest.j now uses the new compiler instead of the old.
2013-05-14 10:31:29 +02:00
Alexander Ljungberg
b53616ead3
New: @deref(<any idempotent expression>).
...
This change makes it possible to @deref any expression, such as a conditional expression, as long as the expression doesn't have side effects.
The reason not to allow dereferencing of expressions with side effects is that we might need to evaluate the expression twice in certain uses of deref, which is not obvious when you look at the deref operator in plain code.
2013-03-10 17:32:28 +00:00
Alexander Ljungberg
f201ab0721
New: update operators on references, such as @deref(x)++.
...
This fix implements support for both prefix and postfix update operators on a dereference.
2013-03-10 14:02:37 +00:00
Alexander Ljungberg
9b4c126534
Unit test @ref and @deref.
2013-03-10 12:17:59 +00:00
Alexander Ljungberg
5200f945fe
New: dictionary literals in Objective-J 2.0.
2013-02-25 14:24:29 +00:00
Aparajita Fishman
1f98dbdf65
Fixed test cases
2013-01-24 09:01:54 +08:00
Alexander Ljungberg
5ec9cf7faf
Fixed: "in" could not be a parameter in a message.
...
With the new compiler, messages such as `[a in:b]` could not be sent, the "in:" parameter throwing an unexpected token error. This was true both if "in" was the first argument or any of the subsequent parameters (such as in `[a something:X in:Y]`).
2013-01-21 02:11:51 +00:00
Martin Carlberg
3e93e180f1
Turn off test case that don't apply to the new compiler
2013-01-11 20:36:12 +01:00
Martin Carlberg
b1cec9480e
New test cases to test ivar handling in new compiler
2012-12-20 09:37:52 +01:00
Martin Carlberg
b52217e8a0
Tried to make the import mess a little better. Fixed a lot of bugs. Changed some class names in the test cases. Looks like all the tests are being run in the same space. Has to look into this…..
2012-12-17 00:40:26 +01:00
Blair Duncan
74431972d8
added missing LOG math global and replaced any math. with correspoinding global
2012-05-10 08:55:19 -04:00
cacaodev
9ef95e1f68
Support for decoding date type in XML 1.0, with test.
2012-03-23 22:28:42 +01:00
Francisco Ryan Tolmasky I
420606d8e8
Tests for forward invocation.
...
Reviewed by @tolmasky.
2011-07-02 13:33:53 -07:00
Alexander Ljungberg
f8984ced97
Refs #903 . Comment out failing tests until Obj-J 2 fixes them.
2011-05-15 19:36:04 -04:00
Alexander Ljungberg
7539b5b06d
Merge pull request #903 from paulbaumgart/cappuccino
...
---
Some OJTestCases for the Preprocessor to help make sure it still works as expected when it gets revamped to remove with() from method code generation.
Note that this adds a test case which the current Preprocessor fails: http://github.com/paulbaumgart/cappuccino/commit/8cc61cccfd78debe96eba96a7b332938e6d5377e#L1R81
2011-05-15 19:25:10 -04:00
Brian Donovan
7be6352531
Add format parameter index support to sprintf.
...
This is primarily useful in cases when the format string can vary, but the argument order will not, as is often the case with format strings in Localized.strings files.
From http://perldoc.perl.org/functions/sprintf.html :
An explicit format parameter index, such as 2$. By default sprintf will format the next unused argument in the list, but this allows you to take the arguments out of order.
See also this Cocoa example: http://stackoverflow.com/questions/1063843/is-there-a-way-to-specify-argument-position-index-in-nsstring-stringwithformat
2010-10-21 09:54:51 -07:00
Paul Baumgart
2cc6c54fbf
Start index for var-args needs to be 2, not 0. I only got lucky that it worked anyway.
2010-09-29 15:19:20 -07:00
Paul Baumgart
e62fd3cf40
Add a test case to test some reductions of regexes that current cause errors in the Preprocessor.
2010-09-24 16:46:31 -07:00
Paul Baumgart
8cc61cccfd
add behavior tests for methods, ivars, and inheritance; currently, one of the ivar tests fails due to bug #498
2010-09-24 15:10:06 -07:00
Paul Baumgart
8de508381a
re-organize directory structure of preprocessor tests
2010-09-24 15:02:07 -07:00
Paul Baumgart
086fa29d78
Objective-J Preprocessor Tests: fix scoping bug that caused only the last file in FILENAMES to be tested.
2010-09-22 00:50:15 -07:00
Francisco Ryan Tolmasky I
70e4dd16df
A few more parser tests and reorg of tests.
...
Reviewed by me.
2010-09-19 08:18:54 -07:00
Francisco Ryan Tolmasky I
b66034ef38
First couple of Objective-J language spec tests.
...
Reviewed by me.
2010-09-18 23:50:06 -07:00
Alexander Ljungberg and Ross Boucher
44555ac724
UTF compatible CFData base64 string encoder and decoder. Use it for CPButton key equivalent archiving. Also ordered CPText.j constants by value and removed the empty CPText class definition as it caused errors with nib2cib. Fixed: the key equivalent for forward delete (CPDeleteFunctionKey, \uF728) was transformed to '(' (\u0028) when archived and unarchived.
2010-06-11 09:39:19 -07:00
Paul Baumgart and Francisco Ryan Tolmasky I
252b258159
fix CFDictionary.containsValue and CFDictionary.countOfValue and add tests to prove it
2010-05-24 15:45:21 -07:00
Francisco Ryan Tolmasky I
9255af210c
Fix for loading Cappuccino apps locally on Windows.
...
Reviewed by me.
2010-03-30 16:28:42 -07:00
Ross Boucher
e3dc9fd96b
Make sprintf no longer global, instead ObjectiveJ.sprintf.
2010-03-07 17:41:33 -08:00
Ross Boucher
c3ac076d13
Remove base64 globals, move to CFData. Update tests.
2010-03-07 17:22:29 -08:00
Francisco Ryan Tolmasky I
89bd5f5b93
Fixed remaining failing CPURL tests and removed prints from CFURL tests.
...
Reviewed by me.
2010-03-06 12:10:57 -08:00
Francisco Ryan Tolmasky I
c4b255ae46
Performance improvements to CFURL internals.
...
Reviewed by me.
2010-03-05 16:06:05 -08:00
Francisco Ryan Tolmasky I
eb57d14673
Further migration from file paths to CFURLs.
...
Reviewed by me.
2010-03-03 01:04:25 -08:00
Ross Boucher
6ddeff2b21
Fix the remaining tests that were failing.
2010-02-21 13:02:52 -08:00
Francisco Ryan Tolmasky I
21ef259e1f
Fix for being too strict when accepting PLISTs and also fixes a regression with erroring when parsing code with shebangs(!).
...
Closes #69 .
Reviewed by me.
2010-02-03 00:31:37 -08:00
Tom Robinson
79ba2af699
Added utilities.js in Objective-J with Base64 encoding/decoding, sprintf moved from CPString. Tests for base64 and sprintf utilities.
2008-12-11 05:23:47 -08:00