Skip to content

Commit

Permalink
Moved rest of the tests to integration2_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaravindar committed Feb 15, 2024
1 parent a34b1b3 commit a92ef31
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 3 deletions.
4 changes: 1 addition & 3 deletions _fixtures/panicex.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ package main
}

func main() {
for {
F0()
}
F0()
}
81 changes: 81 additions & 0 deletions _fixtures/testtracefns.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package main

import "fmt"

func D(i int) int {
return i * i * i
}
func C(i int) int {

return D(i+10) + 20
}
func B(i int) int {
return i * D(i)
}
func A(i int) int {
d := 10 + B(i)
return d + C(i)
}
func second(i int) int {
if i > 0 {
return first(i - 1)
} else {
return 0
}
}
func first(n int) int {
if n <= 1 {
return n
} else {
return second(n - 3)
}
}

func callmed(i int) int {
return i * i * i
}
func callmee(i int) int {

return i + 20
}
func callme2(i int) int {
d := callmee(i) + 40
return d + callmed(i)
}
func callme(i int) int {
return 10 + callme2(i)
}

func F0() {
defer func() {
recover()
}()
F1()
}

func F1() {
F2()
}

func F2() {
F3()
}

func F3() {
F4()
}

func F4() {
panic("blah")
}

func main() {
j := 0
j += A(2)

j += first(6)
j += callme(2)
fmt.Println(j)
F0()

}

0 comments on commit a92ef31

Please sign in to comment.