2014-02-14 22:56:09 +00:00
|
|
|
package ethutil
|
|
|
|
|
|
|
|
import (
|
2014-04-23 09:51:04 +00:00
|
|
|
"fmt"
|
2014-02-14 22:56:09 +00:00
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2014-04-23 09:51:04 +00:00
|
|
|
func TestPreProcess(t *testing.T) {
|
|
|
|
main, init := PreProcess(`
|
|
|
|
init {
|
|
|
|
// init
|
|
|
|
if a > b {
|
|
|
|
if {
|
|
|
|
}
|
|
|
|
}
|
2014-02-14 22:56:09 +00:00
|
|
|
}
|
|
|
|
|
2014-04-23 09:51:04 +00:00
|
|
|
main {
|
|
|
|
// main
|
|
|
|
if a > b {
|
|
|
|
if c > d {
|
|
|
|
}
|
|
|
|
}
|
2014-02-14 22:56:09 +00:00
|
|
|
}
|
2014-04-23 09:51:04 +00:00
|
|
|
`)
|
2014-02-14 22:56:09 +00:00
|
|
|
|
2014-04-23 09:51:04 +00:00
|
|
|
fmt.Println("main")
|
|
|
|
fmt.Println(main)
|
|
|
|
fmt.Println("init")
|
|
|
|
fmt.Println(init)
|
2014-02-14 22:56:09 +00:00
|
|
|
}
|