-
Notifications
You must be signed in to change notification settings - Fork 0
Add test confirming not_connected behavior #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: SVG Rendering Mismatch with BPC Data
The SVG rendering of the circuit is inconsistent with the BPC data structure regarding pin connectivity.
schematic_port_2
is connected in BPC but renders asnot_connected
in the SVG.schematic_port_0
andschematic_port_3
are connected tounnamedsubcircuit31_connectivity_net1
in BPC, but render as connected tounnamedsubcircuit31_connectivity_net0
in the SVG.
This discrepancy indicates a bug in the BPC to graphics conversion process, potentially masking actual circuit connectivity issues.
tests/example04.test.ts#L36-L159
circuit-json-to-bpc/tests/example04.test.ts
Lines 36 to 159 in 85bd230
expect(bpc).toMatchInlineSnapshot(` | |
{ | |
"boxes": [ | |
{ | |
"boxId": "schematic_component_0", | |
"center": { | |
"x": 3, | |
"y": 0, | |
}, | |
"kind": "floating", | |
}, | |
{ | |
"boxId": "schematic_component_1", | |
"center": { | |
"x": -3, | |
"y": 0, | |
}, | |
"kind": "floating", | |
}, | |
{ | |
"boxAttributes": { | |
"is_net_label": true, | |
"source_net_id": "source_net_0", | |
"source_trace_id": undefined, | |
}, | |
"boxId": "schematic_net_label_0", | |
"center": { | |
"x": -4.0012093, | |
"y": -0.00027334999999961695, | |
}, | |
"kind": "fixed", | |
}, | |
], | |
"pins": [ | |
{ | |
"boxId": "schematic_component_0", | |
"color": "component_center", | |
"networkId": "center_schematic_component_0", | |
"offset": { | |
"x": 0, | |
"y": 0, | |
}, | |
"pinId": "schematic_component_0_center", | |
}, | |
{ | |
"boxId": "schematic_component_0", | |
"color": "normal", | |
"networkId": "unnamedsubcircuit31_connectivity_net1", | |
"offset": { | |
"x": -0.5512907, | |
"y": 0.0002732499999993365, | |
}, | |
"pinId": "schematic_port_0", | |
}, | |
{ | |
"boxId": "schematic_component_0", | |
"color": "not_connected", | |
"networkId": "disconnected-0", | |
"offset": { | |
"x": 0.5512907000000005, | |
"y": -0.0002732499999993365, | |
}, | |
"pinId": "schematic_port_1", | |
}, | |
{ | |
"boxId": "schematic_component_1", | |
"color": "component_center", | |
"networkId": "center_schematic_component_1", | |
"offset": { | |
"x": 0, | |
"y": 0, | |
}, | |
"pinId": "schematic_component_1_center", | |
}, | |
{ | |
"boxId": "schematic_component_1", | |
"color": "normal", | |
"networkId": "unnamedsubcircuit31_connectivity_net0", | |
"offset": { | |
"x": -0.5512093000000005, | |
"y": -0.00027334999999961695, | |
}, | |
"pinId": "schematic_port_2", | |
}, | |
{ | |
"boxId": "schematic_component_1", | |
"color": "normal", | |
"networkId": "unnamedsubcircuit31_connectivity_net1", | |
"offset": { | |
"x": 0.5512093, | |
"y": 0.00027334999999961695, | |
}, | |
"pinId": "schematic_port_3", | |
}, | |
{ | |
"boxId": "schematic_net_label_0", | |
"color": "normal", | |
"networkId": "unnamedsubcircuit31_connectivity_net0", | |
"offset": { | |
"x": 0.44999999999999973, | |
"y": 0, | |
}, | |
"pinId": "schematic_net_label_0_pin", | |
}, | |
{ | |
"boxId": "schematic_net_label_0", | |
"color": "netlabel_center", | |
"networkId": "schematic_net_label_0_center", | |
"offset": { | |
"x": 0, | |
"y": 0, | |
}, | |
"pinId": "schematic_net_label_0_center", | |
}, | |
], | |
} | |
`) | |
expect( | |
getSvgFromGraphicsObject(graphics, { | |
backgroundColor: "white", | |
}), | |
).toMatchSvgSnapshot(import.meta.path) |
BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.