Skip to content

Commit 01c1498

Browse files
committed
formatbot: Automatically format code
1 parent e37b77c commit 01c1498

File tree

1 file changed

+85
-87
lines changed

1 file changed

+85
-87
lines changed

tests/repros/repro58-pcb-autolayout-out-of-board.test.tsx

Lines changed: 85 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,93 @@ import { expect, test } from "bun:test"
22
import { getTestFixture } from "tests/fixtures/get-test-fixture"
33
import { sel } from "lib/sel"
44

5-
test(
6-
"pcb autolayout out of board",
7-
async () => {
8-
const { circuit } = getTestFixture()
5+
test("pcb autolayout out of board", async () => {
6+
const { circuit } = getTestFixture()
97

10-
circuit.add(
11-
<board width="25.4mm" height="25.4mm">
12-
<group>
13-
<chip name="U1" footprint="soic20_pw0.6_pl3.9_w11.9_p1.25" />
14-
<capacitor
15-
name="C1"
16-
capacitance="0.1uF"
17-
footprint="0603"
18-
schX={-2}
19-
schY={0}
20-
schRotation={-90}
21-
connections={{
22-
pin2: [sel.U1.pin20, sel.net.GND],
23-
pin1: [sel.U1.pin19, sel.net.V3_3],
24-
}}
25-
/>
26-
<capacitor
27-
name="C2"
28-
capacitance="4.7uF"
29-
footprint="0603"
30-
connections={{ pin2: sel.U1.pin20, pin1: sel.net.V3_3 }}
31-
schRotation={-90}
32-
pcbRotation={180}
33-
/>
34-
<resistor
35-
name="R1"
36-
resistance="2.2k"
37-
footprint="0603"
38-
schRotation={90}
39-
connections={{ pin1: sel.U1.pin9, pin2: sel.JP1.pin3 }}
40-
/>
41-
<resistor
42-
name="R2"
43-
resistance="2.2k"
44-
footprint="0603"
45-
schRotation={90}
46-
connections={{ pin1: sel.U1.pin10, pin2: sel.JP1.pin1 }}
47-
/>
48-
<resistor
49-
name="R3"
50-
resistance="4.7k"
51-
footprint="0603"
52-
schRotation={90}
53-
connections={{ pin1: sel.D1.pin1, pin2: sel.JP2.pin1 }}
54-
/>
55-
<led
56-
name="D1"
57-
color="RED"
58-
footprint="0603"
59-
schRotation={-90}
60-
connections={{ pin2: sel.net.GND }}
61-
/>
62-
<solderjumper
63-
name="JP1"
64-
footprint="solderjumper3_bridged123_pw0.66_pl1.270_p1"
65-
layer="bottom"
66-
bridgedPins={[["1", "2", "3"]]}
67-
pcbRotation={90}
68-
schRotation={180}
69-
/>
70-
<solderjumper
71-
name="JP2"
72-
footprint="solderjumper2_bridged12_pw0.66_pl1.270_p1"
73-
layer="bottom"
74-
bridgedPins={[["1", "2"]]}
75-
pcbRotation={90}
76-
schRotation={180}
77-
connections={{ pin2: sel.net.V3_3 }}
78-
/>
79-
<jumper
80-
name="JP3"
81-
footprint="pinrow4_id1.016_od1.88_nosquareplating_pinlabeltextalignright_pinlabelorthogonal_doublesidedpinlabel_pinlabelverticallyinverted"
82-
connections={{ pin3: sel.U1.pin10 }}
83-
/>
84-
</group>
85-
</board>,
86-
)
8+
circuit.add(
9+
<board width="25.4mm" height="25.4mm">
10+
<group>
11+
<chip name="U1" footprint="soic20_pw0.6_pl3.9_w11.9_p1.25" />
12+
<capacitor
13+
name="C1"
14+
capacitance="0.1uF"
15+
footprint="0603"
16+
schX={-2}
17+
schY={0}
18+
schRotation={-90}
19+
connections={{
20+
pin2: [sel.U1.pin20, sel.net.GND],
21+
pin1: [sel.U1.pin19, sel.net.V3_3],
22+
}}
23+
/>
24+
<capacitor
25+
name="C2"
26+
capacitance="4.7uF"
27+
footprint="0603"
28+
connections={{ pin2: sel.U1.pin20, pin1: sel.net.V3_3 }}
29+
schRotation={-90}
30+
pcbRotation={180}
31+
/>
32+
<resistor
33+
name="R1"
34+
resistance="2.2k"
35+
footprint="0603"
36+
schRotation={90}
37+
connections={{ pin1: sel.U1.pin9, pin2: sel.JP1.pin3 }}
38+
/>
39+
<resistor
40+
name="R2"
41+
resistance="2.2k"
42+
footprint="0603"
43+
schRotation={90}
44+
connections={{ pin1: sel.U1.pin10, pin2: sel.JP1.pin1 }}
45+
/>
46+
<resistor
47+
name="R3"
48+
resistance="4.7k"
49+
footprint="0603"
50+
schRotation={90}
51+
connections={{ pin1: sel.D1.pin1, pin2: sel.JP2.pin1 }}
52+
/>
53+
<led
54+
name="D1"
55+
color="RED"
56+
footprint="0603"
57+
schRotation={-90}
58+
connections={{ pin2: sel.net.GND }}
59+
/>
60+
<solderjumper
61+
name="JP1"
62+
footprint="solderjumper3_bridged123_pw0.66_pl1.270_p1"
63+
layer="bottom"
64+
bridgedPins={[["1", "2", "3"]]}
65+
pcbRotation={90}
66+
schRotation={180}
67+
/>
68+
<solderjumper
69+
name="JP2"
70+
footprint="solderjumper2_bridged12_pw0.66_pl1.270_p1"
71+
layer="bottom"
72+
bridgedPins={[["1", "2"]]}
73+
pcbRotation={90}
74+
schRotation={180}
75+
connections={{ pin2: sel.net.V3_3 }}
76+
/>
77+
<jumper
78+
name="JP3"
79+
footprint="pinrow4_id1.016_od1.88_nosquareplating_pinlabeltextalignright_pinlabelorthogonal_doublesidedpinlabel_pinlabelverticallyinverted"
80+
connections={{ pin3: sel.U1.pin10 }}
81+
/>
82+
</group>
83+
</board>,
84+
)
8785

88-
await circuit.renderUntilSettled()
86+
await circuit.renderUntilSettled()
8987

90-
const circuitJson = circuit.getCircuitJson()
88+
const circuitJson = circuit.getCircuitJson()
9189

92-
// TODO uncomment when fixed
93-
//expect(circuit.db.pcb_component_outside_board_error.list()).toEqual([])
90+
// TODO uncomment when fixed
91+
//expect(circuit.db.pcb_component_outside_board_error.list()).toEqual([])
9492

95-
expect(circuitJson).toMatchPcbSnapshot(import.meta.path)
96-
})
93+
expect(circuitJson).toMatchPcbSnapshot(import.meta.path)
94+
})

0 commit comments

Comments
 (0)