Update analyzer tests accordingly
This commit is contained in:
parent
3485fa1820
commit
7bad3d5672
|
@ -327,7 +327,7 @@ testStringErr (test,
|
|||
"cannot assign to constant", 5, 2,
|
||||
`
|
||||
T: Int
|
||||
| x 0
|
||||
| x = 0
|
||||
[main] = {
|
||||
T.x = 5
|
||||
}
|
||||
|
|
|
@ -6,13 +6,13 @@ func TestConstantValueSpecified (test *testing.T) {
|
|||
testString (test,
|
||||
`
|
||||
Weekday: Int
|
||||
| sunday 1
|
||||
| monday 2
|
||||
| tuesday 3
|
||||
| wednesday 4
|
||||
| thursday 5
|
||||
| friday 6
|
||||
| saturday 7
|
||||
| sunday = 1
|
||||
| monday = 2
|
||||
| tuesday = 3
|
||||
| wednesday = 4
|
||||
| thursday = 5
|
||||
| friday = 6
|
||||
| saturday = 7
|
||||
|
||||
[printWeekday w:Weekday]
|
||||
[f] = [printWeekday Weekday.monday]
|
||||
|
@ -38,13 +38,13 @@ func TestConstantString (test *testing.T) {
|
|||
testString (test,
|
||||
`
|
||||
Weekday: String
|
||||
| sunday 'sunday'
|
||||
| monday 'monday'
|
||||
| tuesday 'tuesday'
|
||||
| wednesday 'wednesday'
|
||||
| thursday 'thursday'
|
||||
| friday 'friday'
|
||||
| saturday 'saturday'
|
||||
| sunday = 'sunday'
|
||||
| monday = 'monday'
|
||||
| tuesday = 'tuesday'
|
||||
| wednesday = 'wednesday'
|
||||
| thursday = 'thursday'
|
||||
| friday = 'friday'
|
||||
| saturday = 'saturday'
|
||||
|
||||
[print s:String]
|
||||
[printWeekday w:Weekday] = [print [~String w]]
|
||||
|
|
|
@ -209,13 +209,13 @@ testStringErr (test,
|
|||
"no constant Weekday.palday", 13, 21,
|
||||
`
|
||||
Weekday: String
|
||||
| sunday 'sunday'
|
||||
| monday 'monday'
|
||||
| tuesday 'tuesday'
|
||||
| wednesday 'wednesday'
|
||||
| thursday 'thursday'
|
||||
| friday 'friday'
|
||||
| saturday 'saturday'
|
||||
| sunday = 'sunday'
|
||||
| monday = 'monday'
|
||||
| tuesday = 'tuesday'
|
||||
| wednesday = 'wednesday'
|
||||
| thursday = 'thursday'
|
||||
| friday = 'friday'
|
||||
| saturday = 'saturday'
|
||||
|
||||
[print s:String]
|
||||
[printWeekday w:Weekday] = [print [~String w]]
|
||||
|
@ -227,12 +227,12 @@ testStringErr (test,
|
|||
"tuesday already defined at stream0.fspl:5:1", 8, 1,
|
||||
`
|
||||
Weekday: String
|
||||
| sunday 'sunday'
|
||||
| monday 'monday'
|
||||
| tuesday 'tuesday'
|
||||
| wednesday 'wednesday'
|
||||
| thursday 'thursday'
|
||||
| tuesday 'tuesday'
|
||||
| friday 'friday'
|
||||
| saturday 'saturday'
|
||||
| sunday = 'sunday'
|
||||
| monday = 'monday'
|
||||
| tuesday = 'tuesday'
|
||||
| wednesday = 'wednesday'
|
||||
| thursday = 'thursday'
|
||||
| tuesday = 'tuesday'
|
||||
| friday = 'friday'
|
||||
| saturday = 'saturday'
|
||||
`)}
|
||||
|
|
Loading…
Reference in New Issue