-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented main function command line arguments (finally)!
- Loading branch information
1 parent
b0ee548
commit a321f36
Showing
29 changed files
with
422 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## tests checking of correct main() signature | ||
|
||
## wrong arguments: | ||
|
||
#experr 1: main( errArgC : Int, args : &[]&[]UByte ) { } | ||
|
||
#experr 1: main( args : &[]&[]UByte, errArg : &[]&[]UByte ) { } | ||
|
||
#experr 1: main( args : &[]&[]Byte ) { } | ||
|
||
#experr 1: main( args : &[]&[]UInt ) { } | ||
|
||
#experr 1: main( args : &[]&[]Bool ) { } | ||
|
||
#experr 1: main( args : &[]&UByte ) { } | ||
|
||
#experr 1: main( args : &[]UByte ) { } | ||
|
||
#experr 1: main( args : &&UByte ) { } | ||
|
||
#experr 1: main( args : &UByte ) { } | ||
|
||
#experr 1: main( args : UByte ) { } | ||
|
||
|
||
## wrong return type: | ||
|
||
#experr 1: main( args : &[]&[]UByte ) -> Bool { return FALSE; } | ||
|
||
#experr 1: main( args : &[]&[]UByte ) -> Float { return 0.0; } | ||
|
||
#experr 1: main( args : &[]&[]UByte ) -> &Int { return new Int(); } | ||
|
||
#experr 1: main( args : &[]&[]UByte ) -> [1]Int { return [ 0I ]; } | ||
|
||
|
||
## correct signature: | ||
|
||
main( args : &[]&[]UByte ) -> Int { | ||
assert args.L == 0; | ||
return 0; | ||
} | ||
|
||
|
||
/* Note: these are also correct signatures but implicitly tested in the other tests: | ||
main( args : &[]&[]UByte ) | ||
main() -> Int | ||
main() | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.