Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c0be31ae
Commit
c0be31ae
authored
Mar 18, 2012
by
Miguel Angel Ajo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some indent, and added some conditional compiles on pcbnew.cpp
parent
06c570ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
pcbnew.cpp
pcbnew/pcbnew.cpp
+1
-3
testLoadSave.py
pcbnew/scripting/tests/testLoadSave.py
+13
-13
No files found.
pcbnew/pcbnew.cpp
View file @
c0be31ae
...
...
@@ -113,8 +113,6 @@ bool EDA_APP::OnInit()
wxFileName
fn
;
PCB_EDIT_FRAME
*
frame
=
NULL
;
int
i
=
0
;
#ifdef KICAD_SCRIPTING
pcbnewInitPythonScripting
();
#endif
...
...
@@ -156,7 +154,7 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
frame
=
new
PCB_EDIT_FRAME
(
NULL
,
wxT
(
"Pcbnew"
),
wxPoint
(
0
,
0
),
wxSize
(
600
,
400
)
);
#ifdef KICAD_SCRIPTING
ScriptingSetPcbEditFrame
(
frame
);
/* give the scripting helpers access to our frame */
ScriptingSetPcbEditFrame
(
frame
);
/* give the scripting helpers access to our frame */
#endif
frame
->
UpdateTitle
();
...
...
pcbnew/scripting/tests/testLoadSave.py
View file @
c0be31ae
...
...
@@ -4,26 +4,26 @@ import unittest
class
TestLoadSave
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
TITLE
=
"Test Board"
self
.
COMMENT1
=
"For load/save test"
self
.
FILENAME
=
"/tmp/test.brd"
self
.
TITLE
=
"Test Board"
self
.
COMMENT1
=
"For load/save test"
self
.
FILENAME
=
"/tmp/test.brd"
def
test_00_save
(
self
):
pcb
=
BOARD
()
pcb
.
GetTitleBlock
()
.
SetTitle
(
self
.
TITLE
)
pcb
.
GetTitleBlock
()
.
SetComment1
(
self
.
COMMENT1
)
result
=
SaveBoard
(
self
.
FILENAME
,
pcb
)
self
.
assertTrue
(
result
)
pcb
=
BOARD
()
pcb
.
GetTitleBlock
()
.
SetTitle
(
self
.
TITLE
)
pcb
.
GetTitleBlock
()
.
SetComment1
(
self
.
COMMENT1
)
result
=
SaveBoard
(
self
.
FILENAME
,
pcb
)
self
.
assertTrue
(
result
)
def
test_01_load
(
self
):
pcb2
=
LoadBoard
(
self
.
FILENAME
)
self
.
assertIsNotNone
(
pcb2
)
def
test_02_titleblock_ok
(
self
):
pcb2
=
LoadBoard
(
self
.
FILENAME
)
tb
=
pcb2
.
GetTitleBlock
()
self
.
assertEqual
(
tb
.
GetTitle
(),
self
.
TITLE
)
self
.
assertEqual
(
tb
.
GetComment1
(),
self
.
COMMENT1
)
pcb2
=
LoadBoard
(
self
.
FILENAME
)
tb
=
pcb2
.
GetTitleBlock
()
self
.
assertEqual
(
tb
.
GetTitle
(),
self
.
TITLE
)
self
.
assertEqual
(
tb
.
GetComment1
(),
self
.
COMMENT1
)
if
__name__
==
'__main__'
:
unittest
.
main
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment