Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Assertions/Nemerle/assertions-1.nemerle
Normal file
1
Task/Assertions/Nemerle/assertions-1.nemerle
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert (foo == 42, $"foo == $foo, not 42.")
|
||||
13
Task/Assertions/Nemerle/assertions-2.nemerle
Normal file
13
Task/Assertions/Nemerle/assertions-2.nemerle
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using Nemerle.Assertions;
|
||||
|
||||
class SampleClass
|
||||
{
|
||||
public SomeMethod (input : list[int]) : int
|
||||
requires input.Length > 0 // requires keyword indicates precondition,
|
||||
// there can be more than one condition per method
|
||||
{ ... }
|
||||
|
||||
public AnotherMethod (input : string) : list[char]
|
||||
ensures value.Length > 0 // ensures keyword indicates postcondition
|
||||
{ ... } // value is a special symbol that indicates the method's return value
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue