@tscircuit/schematic-trace-solver 0.0.168 → 0.0.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +77 -1
- package/lib/solvers/NetLabelToTraceSolver/NetLabelToTraceSolver.ts +2 -2
- package/lib/solvers/NetLabelTraceRecovery/doesTraceRecoveryPathConflict.ts +112 -0
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +60 -222
- package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +46 -64
- package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +7 -25
- package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +68 -104
- package/tests/examples/__snapshots__/example35.snap.svg +5 -23
- package/tests/examples/__snapshots__/example36.snap.svg +27 -45
- package/tests/examples/__snapshots__/example37.snap.svg +7 -25
- package/tests/examples/__snapshots__/example51.snap.svg +47 -83
- package/tests/repros/__snapshots__/board1096-usb-label-overlap-iteration.snap.svg +5 -23
- package/tests/repros/__snapshots__/repro-bc107a-common-emitter-routing.snap.svg +141 -0
- package/tests/repros/__snapshots__/repro-dc-power-isolated-routing.snap.svg +6 -24
- package/tests/repros/__snapshots__/repro-powerbank-3v-system-power.snap.svg +255 -0
- package/tests/repros/assets/repro-bc107a-common-emitter-routing.input.json +687 -0
- package/tests/repros/assets/repro-powerbank-3v-system-power.input.json +1772 -0
- package/tests/repros/repro-bc107a-common-emitter-routing.test.ts +16 -0
- package/tests/repros/repro-powerbank-3v-system-power.test.ts +17 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblem from "./assets/repro-bc107a-common-emitter-routing.input.json"
|
|
6
|
+
|
|
7
|
+
// Exact solver input captured from @tscircuit/core while rendering a BC107A
|
|
8
|
+
// common-emitter amplifier with input/output coupling capacitors and bias rails.
|
|
9
|
+
test("repro bc107a common emitter routing", () => {
|
|
10
|
+
const solver = new SchematicTracePipelineSolver(
|
|
11
|
+
inputProblem as unknown as InputProblem,
|
|
12
|
+
)
|
|
13
|
+
solver.solve()
|
|
14
|
+
|
|
15
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
16
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblem from "./assets/repro-powerbank-3v-system-power.input.json"
|
|
6
|
+
|
|
7
|
+
// Exact solver input captured from the "3 V System Power" sheet in the
|
|
8
|
+
// PowerBank example circuit from @tsci/tscircuit.ti.
|
|
9
|
+
test("repro PowerBank 3 V System Power schematic", () => {
|
|
10
|
+
const solver = new SchematicTracePipelineSolver(
|
|
11
|
+
inputProblem as unknown as InputProblem,
|
|
12
|
+
{ hideRatsNet: true },
|
|
13
|
+
)
|
|
14
|
+
solver.solve()
|
|
15
|
+
|
|
16
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
17
|
+
})
|