-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,7 @@ type MyType { | |
status Status | ||
|
||
} | ||
checks { | ||
status == bar.Status.NEW , error "Status must be NEW" | ||
} | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ type T { | |
a Integer | ||
b optional Integer | ||
} | ||
checks T { | ||
a < b, "a must be less than b" | ||
} | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ type T { | |
a Integer | ||
b optional Integer | ||
} | ||
|
||
checks T { | ||
b != null implies a < b, "a must be less than b", a | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ enum ASIL { | |
C | ||
D | ||
} | ||
checks BaseRequirement { | ||
asil != null, error "Asil must be set", asil | ||
|
||
} | ||
|
||
|
||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ type MyType { | |
status optional Status | ||
|
||
} | ||
checks MyType { | ||
status != null , "Status must be not null" | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ type MyType { | |
status Status | ||
|
||
} | ||
|
||
checks MyType { | ||
bar.Status.NEW == status , "Status must be NEW" | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ | |
type MyType { | ||
name String | ||
} | ||
|
||
checks MyType { | ||
startsXwith(name, "Q"), error "name must start with Q", name | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,8 @@ type MyType { | |
name String | ||
mult String [3..5] | ||
|
||
} | ||
} | ||
|
||
checks MyType { | ||
len(mult) == 3, "mult must have 3 elements" | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ import Foo | |
|
||
type T extends Foo.T { | ||
} | ||
checks T { | ||
endswith(name, "kitten"), "also not a good name" | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ package Foo | |
type T { | ||
name String | ||
} | ||
|
||
checks T { | ||
startswith(name, "potato"), "this is not a good name" | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ package bar | |
type MyType { | ||
name String | ||
} | ||
checks MyType { | ||
len(name) > 1, "name must start with Q", name | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ type T { | |
txt String | ||
len Integer | ||
} | ||
checks T { | ||
len (txt) == len, warning "length is not as expected", len | ||
} |
This file was deleted.
This file was deleted.