Skip to content

Commit 8acad9e

Browse files
committed
fix test x/{build,typesutil}
1 parent 528a274 commit 8acad9e

2 files changed

Lines changed: 56 additions & 56 deletions

File tree

x/build/build_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestKind(t *testing.T) {
8080
testKind(t, "blog_yap.gox", true, true)
8181
}
8282

83-
func TestGop(t *testing.T) {
83+
func TestXGo(t *testing.T) {
8484
var src = `
8585
println "XGo"
8686
`
@@ -246,7 +246,7 @@ import (
246246
247247
func main() {
248248
a := ng.Bigrat_Init__2(big.NewRat(1, 2))
249-
fmt.Println((ng.Bigrat).Gop_Add(a, ng.Bigrat_Init__2(big.NewRat(1, 2))))
249+
fmt.Println((ng.Bigrat).XGo_Add(a, ng.Bigrat_Init__2(big.NewRat(1, 2))))
250250
}
251251
`)
252252
}
@@ -271,7 +271,7 @@ import (
271271
var r io.Reader
272272
273273
func main() {
274-
for _xgo_it := osx.Lines(r).Gop_Enum(); ; {
274+
for _xgo_it := osx.Lines(r).XGo_Enum(); ; {
275275
var _xgo_ok bool
276276
line, _xgo_ok := _xgo_it.Next()
277277
if !_xgo_ok {

x/typesutil/info_test.go

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ func parseGoSource(fset *token.FileSet, filename string, src any, mode goparser.
161161
return pkg, info, err
162162
}
163163

164-
func testGopInfo(t *testing.T, src string, gosrc string, expect string) {
165-
testGopInfoEx(t, xgomod.Default, "main.xgo", src, "main.go", gosrc, expect, parser.Config{})
164+
func testXGoInfo(t *testing.T, src string, gosrc string, expect string) {
165+
testXGoInfoEx(t, xgomod.Default, "main.xgo", src, "main.go", gosrc, expect, parser.Config{})
166166
}
167167

168168
func testSpxInfo(t *testing.T, name string, src string, expect string) {
169-
testGopInfoEx(t, spxMod, name, src, "main.go", "", expect, spxParserConf())
169+
testXGoInfoEx(t, spxMod, name, src, "main.go", "", expect, spxParserConf())
170170
}
171171

172-
func testGopInfoEx(t *testing.T, mod *xgomod.Module, name string, src string, goname string, gosrc string, expect string, parseConf parser.Config) {
172+
func testXGoInfoEx(t *testing.T, mod *xgomod.Module, name string, src string, goname string, gosrc string, expect string, parseConf parser.Config) {
173173
fset := token.NewFileSet()
174174
_, info, _, err := parseMixedSource(mod, fset, name, src, goname, gosrc, parseConf, false)
175175
if err != nil {
@@ -578,7 +578,7 @@ func test() {
578578
}
579579

580580
func TestSliceLit(t *testing.T) {
581-
testGopInfo(t, `
581+
testXGoInfo(t, `
582582
a := [100,200]
583583
println a
584584
`, ``, `== types ==
@@ -596,7 +596,7 @@ println a
596596
}
597597

598598
func TestForPhrase1(t *testing.T) {
599-
testGopInfo(t, `
599+
testXGoInfo(t, `
600600
sum := 0
601601
for x <- [1, 3, 5, 7, 11, 13, 17], x > 3 {
602602
sum = sum + x
@@ -635,7 +635,7 @@ println sum
635635
}
636636

637637
func TestForPhrase2(t *testing.T) {
638-
testGopInfo(t, `
638+
testXGoInfo(t, `
639639
sum := 0
640640
for i, x <- [1, 3, 5, 7, 11, 13, 17], i%2 == 1 && x > 3 {
641641
sum = sum + x
@@ -682,7 +682,7 @@ println sum
682682
}
683683

684684
func TestMapComprehension(t *testing.T) {
685-
testGopInfo(t, `
685+
testXGoInfo(t, `
686686
y := {x: i for i, x <- ["1", "3", "5", "7", "11"]}
687687
println y
688688
`, ``, `== types ==
@@ -709,7 +709,7 @@ println y
709709
}
710710

711711
func TestListComprehension(t *testing.T) {
712-
testGopInfo(t, `
712+
testXGoInfo(t, `
713713
a := [1, 3.4, 5]
714714
b := [x*x for x <- a]
715715
_ = b
@@ -735,7 +735,7 @@ _ = b
735735
}
736736

737737
func TestListComprehensionMultiLevel(t *testing.T) {
738-
testGopInfo(t, `
738+
testXGoInfo(t, `
739739
arr := [1, 2, 3, 4.1, 5, 6]
740740
x := [[a, b] for a <- arr, a < b for b <- arr, b > 2]
741741
println("x:", x)
@@ -779,7 +779,7 @@ println("x:", x)
779779
}
780780

781781
func TestFileEnumLines(t *testing.T) {
782-
testGopInfo(t, `
782+
testXGoInfo(t, `
783783
import "os"
784784
785785
for line <- os.Stdin {
@@ -801,7 +801,7 @@ for line <- os.Stdin {
801801
}
802802

803803
func TestLambdaExpr(t *testing.T) {
804-
testGopInfo(t, `package main
804+
testXGoInfo(t, `package main
805805
func Map(c []float64, t func(float64) float64) {
806806
// ...
807807
}
@@ -872,7 +872,7 @@ Map2([1.2, 3.5, 6], x => (x * x, x + x))
872872
}
873873

874874
func TestLambdaExpr2(t *testing.T) {
875-
testGopInfo(t, `package main
875+
testXGoInfo(t, `package main
876876
func Map(c []float64, t func(float64) float64) {
877877
// ...
878878
}
@@ -951,7 +951,7 @@ Map2([1.2, 3.5, 6], x => {
951951
}
952952

953953
func TestMixedOverload1(t *testing.T) {
954-
testGopInfo(t, `
954+
testXGoInfo(t, `
955955
type Mesh struct {
956956
}
957957
@@ -1202,7 +1202,7 @@ func OnKey__a(a, b string, v ...int) {
12021202
}
12031203

12041204
func TestMixedOverload2(t *testing.T) {
1205-
testGopInfo(t, `
1205+
testXGoInfo(t, `
12061206
type Mesh struct {
12071207
}
12081208
@@ -1437,7 +1437,7 @@ func OnKey__a(a, b string, v ...int) {
14371437
}
14381438

14391439
func TestMixedOverload3(t *testing.T) {
1440-
testGopInfo(t, `
1440+
testXGoInfo(t, `
14411441
Test
14421442
Test 100
14431443
var n N
@@ -1517,10 +1517,10 @@ func TestOverloadNamed(t *testing.T) {
15171517
005: 5:15 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
15181518
006: 5:19 | M | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
15191519
007: 6: 6 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
1520-
008: 6:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
1520+
008: 6:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.XGox_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
15211521
009: 6:14 | string | type string
15221522
010: 7: 6 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
1523-
011: 7:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
1523+
011: 7:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.XGox_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
15241524
012: 7:14 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
15251525
013: 7:18 | M | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
15261526
== overloads ==
@@ -1557,10 +1557,10 @@ func TestOverloadNamed(t *testing.T) {
15571557
005: 5:15 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
15581558
006: 5:19 | M | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
15591559
007: 6: 6 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
1560-
008: 6:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
1560+
008: 6:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.XGox_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
15611561
009: 6:14 | string | type string
15621562
010: 7: 6 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
1563-
011: 7:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
1563+
011: 7:10 | Var | func github.com/goplus/xgo/cl/internal/overload/bar.XGox_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
15641564
012: 7:14 | bar | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
15651565
013: 7:18 | M | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
15661566
== overloads ==
@@ -1569,7 +1569,7 @@ func TestOverloadNamed(t *testing.T) {
15691569
002: 6:10 | Var | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__xgo_overload_args__ interface{_()})
15701570
003: 7:10 | Var | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__xgo_overload_args__ interface{_()})`
15711571
}
1572-
testGopInfo(t, `
1572+
testXGoInfo(t, `
15731573
import "github.com/goplus/xgo/cl/internal/overload/bar"
15741574
15751575
var a bar.Var[int]
@@ -1606,9 +1606,9 @@ func TestMixedOverloadNamed(t *testing.T) {
16061606
001: 2:11 | int | type int
16071607
002: 3: 7 | Var | type main.Var__1[T map[string]any] struct{val T}
16081608
003: 3:11 | M | type main.M = map[string]any
1609-
004: 4: 6 | Var | func main.Gopx_Var_Cast__0[T main.basetype]() *main.Var__0[T]
1609+
004: 4: 6 | Var | func main.XGox_Var_Cast__0[T main.basetype]() *main.Var__0[T]
16101610
005: 4:10 | string | type string
1611-
006: 5: 6 | Var | func main.Gopx_Var_Cast__1[T map[string]any]() *main.Var__1[T]
1611+
006: 5: 6 | Var | func main.XGox_Var_Cast__1[T map[string]any]() *main.Var__1[T]
16121612
007: 5:10 | M | type main.M = map[string]any
16131613
== overloads ==
16141614
000: 2: 7 | Var | type main.Var = func(__xgo_overload_args__ interface{_()})
@@ -1640,9 +1640,9 @@ func TestMixedOverloadNamed(t *testing.T) {
16401640
001: 2:11 | int | type int
16411641
002: 3: 7 | Var | type main.Var__1[T map[string]any] struct{val T}
16421642
003: 3:11 | M | type main.M = map[string]any
1643-
004: 4: 6 | Var | func main.Gopx_Var_Cast__0[T main.basetype]() *main.Var__0[T]
1643+
004: 4: 6 | Var | func main.XGox_Var_Cast__0[T main.basetype]() *main.Var__0[T]
16441644
005: 4:10 | string | type string
1645-
006: 5: 6 | Var | func main.Gopx_Var_Cast__1[T map[string]any]() *main.Var__1[T]
1645+
006: 5: 6 | Var | func main.XGox_Var_Cast__1[T map[string]any]() *main.Var__1[T]
16461646
007: 5:10 | M | type main.M = map[string]any
16471647
== overloads ==
16481648
000: 2: 7 | Var | type main.Var = func(__xgo_overload_args__ interface{_()})
@@ -1651,7 +1651,7 @@ func TestMixedOverloadNamed(t *testing.T) {
16511651
003: 5: 6 | Var | type main.Var = func(__xgo_overload_args__ interface{_()})`
16521652
}
16531653

1654-
testGopInfo(t, `
1654+
testXGoInfo(t, `
16551655
var a Var[int]
16561656
var b Var[M]
16571657
c := Var(string)
@@ -1673,11 +1673,11 @@ type Var__1[T map[string]any] struct {
16731673
val T
16741674
}
16751675
1676-
func Gopx_Var_Cast__0[T basetype]() *Var__0[T] {
1676+
func XGox_Var_Cast__0[T basetype]() *Var__0[T] {
16771677
return new(Var__0[T])
16781678
}
16791679
1680-
func Gopx_Var_Cast__1[T map[string]any]() *Var__1[T] {
1680+
func XGox_Var_Cast__1[T map[string]any]() *Var__1[T] {
16811681
return new(Var__1[T])
16821682
}
16831683
`, expect)
@@ -1693,11 +1693,11 @@ func TestMixedRawNamed(t *testing.T) {
16931693
003: 3: 7 | Var__1 *ast.Ident | type : main.Var__1[main.M] | type
16941694
004: 3: 7 | Var__1[M] *ast.IndexExpr | type : main.Var__1[main.M] | type
16951695
005: 3:14 | M *ast.Ident | type : main.M | type
1696-
006: 4: 6 | Gopx_Var_Cast__0 *ast.Ident | value : func[T main.basetype]() *main.Var__0[T] | value
1697-
007: 4: 6 | Gopx_Var_Cast__0[string] *ast.IndexExpr | var : func() *main.Var__0[string] | variable
1696+
006: 4: 6 | XGox_Var_Cast__0 *ast.Ident | value : func[T main.basetype]() *main.Var__0[T] | value
1697+
007: 4: 6 | XGox_Var_Cast__0[string] *ast.IndexExpr | var : func() *main.Var__0[string] | variable
16981698
008: 4:23 | string *ast.Ident | type : string | type
1699-
009: 5: 6 | Gopx_Var_Cast__1 *ast.Ident | value : func[T map[string]interface{}]() *main.Var__1[T] | value
1700-
010: 5: 6 | Gopx_Var_Cast__1[M] *ast.IndexExpr | var : func() *main.Var__1[main.M] | variable
1699+
009: 5: 6 | XGox_Var_Cast__1 *ast.Ident | value : func[T map[string]interface{}]() *main.Var__1[T] | value
1700+
010: 5: 6 | XGox_Var_Cast__1[M] *ast.IndexExpr | var : func() *main.Var__1[main.M] | variable
17011701
011: 5:23 | M *ast.Ident | type : main.M | type
17021702
== defs ==
17031703
000: 2: 5 | a | var main.a main.Var__0[int]
@@ -1710,9 +1710,9 @@ func TestMixedRawNamed(t *testing.T) {
17101710
001: 2:14 | int | type int
17111711
002: 3: 7 | Var__1 | type main.Var__1[T map[string]any] struct{val T}
17121712
003: 3:14 | M | type main.M = map[string]any
1713-
004: 4: 6 | Gopx_Var_Cast__0 | func main.Gopx_Var_Cast__0[T main.basetype]() *main.Var__0[T]
1713+
004: 4: 6 | XGox_Var_Cast__0 | func main.XGox_Var_Cast__0[T main.basetype]() *main.Var__0[T]
17141714
005: 4:23 | string | type string
1715-
006: 5: 6 | Gopx_Var_Cast__1 | func main.Gopx_Var_Cast__1[T map[string]any]() *main.Var__1[T]
1715+
006: 5: 6 | XGox_Var_Cast__1 | func main.XGox_Var_Cast__1[T map[string]any]() *main.Var__1[T]
17161716
007: 5:23 | M | type main.M = map[string]any`
17171717
} else {
17181718
expect = `== types ==
@@ -1722,11 +1722,11 @@ func TestMixedRawNamed(t *testing.T) {
17221722
003: 3: 7 | Var__1 *ast.Ident | type : main.Var__1[map[string]interface{}] | type
17231723
004: 3: 7 | Var__1[M] *ast.IndexExpr | type : main.Var__1[map[string]interface{}] | type
17241724
005: 3:14 | M *ast.Ident | type : map[string]interface{} | type
1725-
006: 4: 6 | Gopx_Var_Cast__0 *ast.Ident | value : func[T main.basetype]() *main.Var__0[T] | value
1726-
007: 4: 6 | Gopx_Var_Cast__0[string] *ast.IndexExpr | var : func() *main.Var__0[string] | variable
1725+
006: 4: 6 | XGox_Var_Cast__0 *ast.Ident | value : func[T main.basetype]() *main.Var__0[T] | value
1726+
007: 4: 6 | XGox_Var_Cast__0[string] *ast.IndexExpr | var : func() *main.Var__0[string] | variable
17271727
008: 4:23 | string *ast.Ident | type : string | type
1728-
009: 5: 6 | Gopx_Var_Cast__1 *ast.Ident | value : func[T map[string]interface{}]() *main.Var__1[T] | value
1729-
010: 5: 6 | Gopx_Var_Cast__1[M] *ast.IndexExpr | var : func() *main.Var__1[map[string]interface{}] | variable
1728+
009: 5: 6 | XGox_Var_Cast__1 *ast.Ident | value : func[T map[string]interface{}]() *main.Var__1[T] | value
1729+
010: 5: 6 | XGox_Var_Cast__1[M] *ast.IndexExpr | var : func() *main.Var__1[map[string]interface{}] | variable
17301730
011: 5:23 | M *ast.Ident | type : map[string]interface{} | type
17311731
== defs ==
17321732
000: 2: 5 | a | var main.a main.Var__0[int]
@@ -1739,16 +1739,16 @@ func TestMixedRawNamed(t *testing.T) {
17391739
001: 2:14 | int | type int
17401740
002: 3: 7 | Var__1 | type main.Var__1[T map[string]any] struct{val T}
17411741
003: 3:14 | M | type main.M = map[string]any
1742-
004: 4: 6 | Gopx_Var_Cast__0 | func main.Gopx_Var_Cast__0[T main.basetype]() *main.Var__0[T]
1742+
004: 4: 6 | XGox_Var_Cast__0 | func main.XGox_Var_Cast__0[T main.basetype]() *main.Var__0[T]
17431743
005: 4:23 | string | type string
1744-
006: 5: 6 | Gopx_Var_Cast__1 | func main.Gopx_Var_Cast__1[T map[string]any]() *main.Var__1[T]
1744+
006: 5: 6 | XGox_Var_Cast__1 | func main.XGox_Var_Cast__1[T map[string]any]() *main.Var__1[T]
17451745
007: 5:23 | M | type main.M = map[string]any`
17461746
}
1747-
testGopInfo(t, `
1747+
testXGoInfo(t, `
17481748
var a Var__0[int]
17491749
var b Var__1[M]
1750-
c := Gopx_Var_Cast__0[string]
1751-
d := Gopx_Var_Cast__1[M]
1750+
c := XGox_Var_Cast__0[string]
1751+
d := XGox_Var_Cast__1[M]
17521752
`, `
17531753
package main
17541754
@@ -1766,11 +1766,11 @@ type Var__1[T map[string]any] struct {
17661766
val T
17671767
}
17681768
1769-
func Gopx_Var_Cast__0[T basetype]() *Var__0[T] {
1769+
func XGox_Var_Cast__0[T basetype]() *Var__0[T] {
17701770
return new(Var__0[T])
17711771
}
17721772
1773-
func Gopx_Var_Cast__1[T map[string]any]() *Var__1[T] {
1773+
func XGox_Var_Cast__1[T map[string]any]() *Var__1[T] {
17741774
return new(Var__1[T])
17751775
}
17761776
`, expect)
@@ -2163,7 +2163,7 @@ func (p *N) Test__1(n int) {
21632163
}
21642164

21652165
func TestGopOverloadUses(t *testing.T) {
2166-
testGopInfo(t, `
2166+
testXGoInfo(t, `
21672167
func MulInt(a, b int) int {
21682168
return a * b
21692169
}
@@ -2215,7 +2215,7 @@ Mul 100,200,300
22152215
027: 19: 9 | 200 *ast.BasicLit | value : untyped int = 200 | constant
22162216
028: 19:13 | 300 *ast.BasicLit | value : untyped int = 300 | constant
22172217
== defs ==
2218-
000: 0: 0 | Gopo_Mul | const main.Gopo_Mul untyped string
2218+
000: 0: 0 | XGoo_Mul | const main.XGoo_Mul untyped string
22192219
001: 2: 6 | MulInt | func main.MulInt(a int, b int) int
22202220
002: 2:13 | a | var a int
22212221
003: 2:16 | b | var b int
@@ -2250,7 +2250,7 @@ Mul 100,200,300
22502250
000: 18: 1 | Mul | func main.Mul(__xgo_overload_args__ interface{_()})
22512251
001: 19: 1 | Mul | func main.Mul(__xgo_overload_args__ interface{_()})`)
22522252

2253-
testGopInfo(t, `
2253+
testXGoInfo(t, `
22542254
type foo struct {
22552255
}
22562256
@@ -2296,7 +2296,7 @@ var d = a.mul(c)
22962296
021: 20: 9 | a.mul(c) *ast.CallExpr | value : *main.foo | value
22972297
022: 20:15 | c *ast.Ident | var : *main.foo | variable
22982298
== defs ==
2299-
000: 0: 0 | Gopo_foo_mul | const main.Gopo_foo_mul untyped string
2299+
000: 0: 0 | XGoo_foo_mul | const main.XGoo_foo_mul untyped string
23002300
001: 2: 6 | foo | type main.foo struct{}
23012301
002: 5: 7 | a | var a *main.foo
23022302
003: 5:15 | mulInt | func (*main.foo).mulInt(b int) *main.foo
@@ -2336,7 +2336,7 @@ var d = a.mul(c)
23362336
}
23372337

23382338
func TestGopOverloadDecl(t *testing.T) {
2339-
testGopInfo(t, `
2339+
testXGoInfo(t, `
23402340
func addInt0() {
23412341
}
23422342
@@ -2395,7 +2395,7 @@ func init() {
23952395
024: 27: 6 | "hello" *ast.BasicLit | value : untyped string = "hello" | constant
23962396
025: 27:15 | "world" *ast.BasicLit | value : untyped string = "world" | constant
23972397
== defs ==
2398-
000: 0: 0 | Gopo_add | const main.Gopo_add untyped string
2398+
000: 0: 0 | XGoo_add | const main.XGoo_add untyped string
23992399
001: 2: 6 | addInt0 | func main.addInt0()
24002400
002: 5: 6 | addInt1 | func main.addInt1(i int)
24012401
003: 5:14 | i | var i int
@@ -2431,7 +2431,7 @@ func init() {
24312431
001: 26: 2 | add | func main.add(__xgo_overload_args__ interface{_()})
24322432
002: 27: 2 | add | func main.add(__xgo_overload_args__ interface{_()})`)
24332433

2434-
testGopInfo(t, `
2434+
testXGoInfo(t, `
24352435
func add = (
24362436
func(a, b int) int {
24372437
return a + b
@@ -2533,7 +2533,7 @@ func add = (
25332533
015: 13:10 | a + b *ast.BinaryExpr | value : float64 | value
25342534
016: 13:14 | b *ast.Ident | var : float64 | variable
25352535
== defs ==
2536-
000: 0: 0 | Gopo_Rect_add | const main.Gopo_Rect_add untyped string
2536+
000: 0: 0 | XGoo_Rect_add | const main.XGoo_Rect_add untyped string
25372537
001: 1: 1 | this | var this *main.Rect
25382538
002: 2: 6 | addInt | func (*main.Rect).addInt(a int, b int) int
25392539
003: 2:13 | a | var a int

0 commit comments

Comments
 (0)