Added test for various errors in the component instantiation.

This commit is contained in:
SET 2020-08-14 18:02:32 -03:00
parent 289766dbc0
commit a1255590e2
13 changed files with 364 additions and 3 deletions

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male
U 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F346E8B
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,41 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L 74xx:74LS04 U1
U 3 1 5F345E39
P 5200 2500
AR Path="/5F342DEB/5F345E39" Ref="U1" Part="3"
AR Path="/5F34E267/5F345E39" Ref="U2" Part="3"
F 0 "U2" H 5200 2817 50 0000 C CNN
F 1 "74LS04" H 5200 2726 50 0000 C CNN
F 2 "" H 5200 2500 50 0001 C CNN
F 3 "http://www.ti.com/lit/gpn/sn74LS04" H 5200 2500 50 0001 C CNN
3 5200 1500
1 0 0 -1
$EndComp
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
P 2950
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -14,10 +14,10 @@ Comment3 ""
Comment4 ""
$EndDescr
$Comp
L l9:R R1
L l9:R R?
U 1 1 5EBE8A2E
P 3500 2200
F 0 "R1" H 3570 2246 50 0000 L CNN
F 0 "R?" H 3570 2246 50 0000 L CNN
F 1 "100" H 3570 2155 50 0000 L CNN
F 2 "Resistor_SMD:R_0805_2012Metric" V 3430 2200 50 0001 C CNN
F 3 "~" H 3500 2200 50 0001 C CNN

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
R Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,27 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
QP 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,26 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
U 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,28 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Connector:Conn_01x06_Male J1
Q 1 1 5F170FD6
P 2950 2150
F 0 "J1" H 3058 2531 50 0000 C CNN
F 1 "Bizarre Bus" H 3058 2440 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 2950 2150 50 0001 C CNN
F 3 "~" H 2950 2150 50 0001 C CNN
F 4 "1x6" H 2950 2150 50 0001 C CNN "Description"
1 2950 2150
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,27 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L l9:R REF
U 1 1 5EBE8A2E
P 3500 2200
F 0 "REF" H 3570 2246 50 0000 L CNN
F 1 "100" H 3570 2155 50 0000 L CNN
F 2 "Resistor_SMD:R_0805_2012Metric" V 3430 2200 50 0001 C CNN
F 3 "~" H 3500 2200 50 0001 C CNN
1 3500 2200
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -81,7 +81,7 @@ def test_sch_errors_l8():
def test_sch_errors_l9():
setup_ctx('l9', 'error_l9', 'Missing DCM signature')
setup_ctx('l9', 'error_l9', ['Missing DCM signature', 'Component (.*?) is not annotated'])
def test_sch_errors_field():
@ -96,3 +96,47 @@ def test_sch_errors_ar():
setup_ctx('field_ar', 'error_ar', ['Unknown AR field .?Bogus.?', 'Alternative Reference without path',
'Alternative Reference without reference', 'Component `U1` without the basic fields',
'Footprint with more than one colon'])
def test_sch_errors_miss_label():
setup_ctx('miss_label', 'error_miss_label', 'Missing component label')
def test_sch_errors_bad_label():
setup_ctx('bad_label', 'error_bad_label', 'Malformed component label')
def test_sch_errors_miss_unit():
setup_ctx('miss_unit', 'error_miss_unit', 'Missing component unit')
def test_sch_errors_bad_unit():
setup_ctx('bad_unit', 'error_bad_unit', 'Malformed component unit')
def test_sch_errors_miss_pos():
setup_ctx('miss_pos', 'error_miss_pos', 'Missing component position')
def test_sch_errors_bad_pos():
setup_ctx('bad_pos', 'error_bad_pos', ['Malformed component position', 'Inconsistent position for component'])
def test_sch_errors_miss_red_pos():
setup_ctx('miss_red_pos', 'error_miss_red_pos', 'Missing component redundant position')
def test_sch_errors_bad_red_pos():
setup_ctx('bad_red_pos', 'error_bad_red_pos', 'Malformed component redundant position')
def test_sch_errors_miss_matrix():
setup_ctx('miss_matrix', 'error_miss_matrix', 'Missing component orientation matrix')
def test_sch_errors_bad_matrix():
setup_ctx('bad_matrix', 'error_bad_matrix', 'Malformed component orientation matrix')
def test_sch_errors_wrong_ref():
setup_ctx('wrong_ref', 'error_wrong_ref', 'Malformed component reference')