mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-24 15:35:52 +00:00
Update README
This commit is contained in:
1 parent
d106e6485b
commit
653f706f1b
1 file changed
+45
-5
@@ -1,6 +1,46 @@
|
||||
To run these tests:
|
||||
## Run tests
|
||||
|
||||
- open x.j
|
||||
- check what is the expected output in the comments
|
||||
- run objj x.j
|
||||
- check you get the correct output
|
||||
./run.py
|
||||
|
||||
|
||||
## Create a test case
|
||||
|
||||
create a `.j` file in `TestCases` folder:
|
||||
|
||||
-First line MUST be:
|
||||
|
||||
// Expected output: [OBJJ_STATUS_CODE]
|
||||
|
||||
|
||||
Then after that add a block comment that contains:
|
||||
|
||||
/*
|
||||
START_EXPECTED
|
||||
[CONSOLE_OUTPUT_OF_OBJJ]
|
||||
END_EXPECTED
|
||||
*/
|
||||
|
||||
|
||||
Be sure to replace the file path by the token `[__PATH__]` After that, add the code you want to test.
|
||||
|
||||
If your test doesn't expect any output, don't put any `START_EXPECTED` and `END_EXPECTED`
|
||||
|
||||
|
||||
For instance:
|
||||
|
||||
/*
|
||||
START_EXPECTED
|
||||
Error on line 10771 of file [unknown]
|
||||
SyntaxError:
|
||||
@typedef MyType
|
||||
^
|
||||
ERROR line 2 in file:[__PATH__]: Duplicate type definition MyType
|
||||
END_EXPECTED
|
||||
*/
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
@implementation MyCall : CPObject
|
||||
{
|
||||
CPString property1;
|
||||
}
|
||||
@end
|
||||
Reference in new issue
Block a user