Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 3c7dc9d

Browse files
committed
add test changes
1 parent 6cae1ba commit 3c7dc9d

14 files changed

+88
-24
lines changed

tests/ppx/react/expected/commentAtTop.res.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
type props<'msg> = {msg: 'msg} // test React JSX file
1+
type props<'msg> = { // test React JSX file
2+
msg: 'msg,
3+
}
24

35
@react.component
46
let make = ({msg, _}: props<'msg>) => {

tests/ppx/react/expected/externalWithCustomName.res.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ let t = React.createElement(Foo.component, Foo.componentProps(~a=1, ~b={"1"}, ()
1313
@@jsxConfig({version: 4, mode: "classic"})
1414

1515
module Foo = {
16-
type props<'a, 'b> = {a: 'a, b: 'b}
16+
type props<'a, 'b> = {
17+
a: 'a,
18+
b: 'b,
19+
}
1720

1821
@module("Foo")
1922
external component: React.componentLike<props<int, string>, React.element> = "component"
@@ -24,7 +27,10 @@ let t = React.createElement(Foo.component, {a: 1, b: "1"})
2427
@@jsxConfig({version: 4, mode: "automatic"})
2528

2629
module Foo = {
27-
type props<'a, 'b> = {a: 'a, b: 'b}
30+
type props<'a, 'b> = {
31+
a: 'a,
32+
b: 'b,
33+
}
2834

2935
@module("Foo")
3036
external component: React.componentLike<props<int, string>, React.element> = "component"

tests/ppx/react/expected/externalWithRef.res.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ module V3 = {
1818
@@jsxConfig({version: 4, mode: "classic"})
1919

2020
module V4C = {
21-
type props<'x, 'ref> = {x: 'x, ref?: 'ref}
21+
type props<'x, 'ref> = {
22+
x: 'x,
23+
ref?: 'ref,
24+
}
2225

2326
@module("componentForwardRef")
2427
external make: React.componentLike<props<string, ReactDOM.Ref.currentDomRef>, React.element> =
@@ -28,7 +31,10 @@ module V4C = {
2831
@@jsxConfig({version: 4, mode: "automatic"})
2932

3033
module V4C = {
31-
type props<'x, 'ref> = {x: 'x, ref?: 'ref}
34+
type props<'x, 'ref> = {
35+
x: 'x,
36+
ref?: 'ref,
37+
}
3238

3339
@module("componentForwardRef")
3440
external make: React.componentLike<props<string, ReactDOM.Ref.currentDomRef>, React.element> =

tests/ppx/react/expected/externalWithTypeVariables.res.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ module V3 = {
1616
@@jsxConfig({version: 4, mode: "classic"})
1717

1818
module V4C = {
19-
type props<'x, 'children> = {x: 'x, children: 'children}
19+
type props<'x, 'children> = {
20+
x: 'x,
21+
children: 'children,
22+
}
2023

2124
@module("c")
2225
external make: React.componentLike<props<t<'a>, React.element>, React.element> = "component"
@@ -25,7 +28,10 @@ module V4C = {
2528
@@jsxConfig({version: 4, mode: "automatic"})
2629

2730
module V4C = {
28-
type props<'x, 'children> = {x: 'x, children: 'children}
31+
type props<'x, 'children> = {
32+
x: 'x,
33+
children: 'children,
34+
}
2935

3036
@module("c")
3137
external make: React.componentLike<props<t<'a>, React.element>, React.element> = "component"

tests/ppx/react/expected/fileLevelConfig.res.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ module V3 = {
1717
@@jsxConfig({version: 4, mode: "classic"})
1818

1919
module V4C = {
20-
type props<'msg> = {msg: 'msg}
20+
type props<'msg> = {
21+
msg: 'msg,
22+
}
2123

2224
@react.component
2325
let make = ({msg, _}: props<'msg>) => {
@@ -33,7 +35,9 @@ module V4C = {
3335
@@jsxConfig({version: 4, mode: "automatic"})
3436

3537
module V4A = {
36-
type props<'msg> = {msg: 'msg}
38+
type props<'msg> = {
39+
msg: 'msg,
40+
}
3741

3842
@react.component
3943
let make = ({msg, _}: props<'msg>) => {

tests/ppx/react/expected/interface.res.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module A = {
2-
type props<'x> = {x: 'x}
2+
type props<'x> = {
3+
x: 'x,
4+
}
35
@react.component let make = ({x, _}: props<'x>) => React.string(x)
46
let make = {
57
let \"Interface$A" = (props: props<_>) => make(props)

tests/ppx/react/expected/interface.resi.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module A: {
2-
type props<'x> = {x: 'x}
2+
type props<'x> = {
3+
x: 'x,
4+
}
35
let make: React.componentLike<props<string>, React.element>
46
}
57

tests/ppx/react/expected/interfaceWithRef.res.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
type props<'x, 'ref> = {x: 'x, ref?: 'ref}
1+
type props<'x, 'ref> = {
2+
x: 'x,
3+
ref?: 'ref,
4+
}
25
@react.component
36
let make = (
47
{x, _}: props<string, ReactDOM.Ref.currentDomRef>,
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
type props<'x, 'ref> = {x: 'x, ref?: 'ref}
1+
type props<'x, 'ref> = {
2+
x: 'x,
3+
ref?: 'ref,
4+
}
25
let make: React.componentLike<props<string, ReactDOM.Ref.currentDomRef>, React.element>

tests/ppx/react/expected/newtype.res.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ module V3 = {
2424
@@jsxConfig({version: 4, mode: "classic"})
2525

2626
module V4C = {
27-
type props<'a, 'b, 'c> = {a: 'a, b: 'b, c: 'c}
27+
type props<'a, 'b, 'c> = {
28+
a: 'a,
29+
b: 'b,
30+
c: 'c,
31+
}
2832

2933
@react.component
3034
let make = ({a, b, c, _}: props<'\"type-a", array<option<[#Foo('\"type-a")]>>, 'a>) =>
@@ -39,7 +43,11 @@ module V4C = {
3943
@@jsxConfig({version: 4, mode: "automatic"})
4044

4145
module V4A = {
42-
type props<'a, 'b, 'c> = {a: 'a, b: 'b, c: 'c}
46+
type props<'a, 'b, 'c> = {
47+
a: 'a,
48+
b: 'b,
49+
c: 'c,
50+
}
4351

4452
@react.component
4553
let make = ({a, b, c, _}: props<'\"type-a", array<option<[#Foo('\"type-a")]>>, 'a>) =>

0 commit comments

Comments
 (0)