Fixed some indent, and added some conditional compiles on pcbnew.cpp
This commit is contained in:
parent
06c570bab3
commit
c0be31aeda
|
@ -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();
|
||||
|
|
|
@ -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()
|
Loading…
Reference in New Issue