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;
|
wxFileName fn;
|
||||||
PCB_EDIT_FRAME* frame = NULL;
|
PCB_EDIT_FRAME* frame = NULL;
|
||||||
|
|
||||||
int i=0;
|
|
||||||
|
|
||||||
#ifdef KICAD_SCRIPTING
|
#ifdef KICAD_SCRIPTING
|
||||||
pcbnewInitPythonScripting();
|
pcbnewInitPythonScripting();
|
||||||
#endif
|
#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 ) );
|
frame = new PCB_EDIT_FRAME( NULL, wxT( "Pcbnew" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) );
|
||||||
|
|
||||||
#ifdef KICAD_SCRIPTING
|
#ifdef KICAD_SCRIPTING
|
||||||
ScriptingSetPcbEditFrame(frame); /* give the scripting helpers access to our frame */
|
ScriptingSetPcbEditFrame(frame); /* give the scripting helpers access to our frame */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
frame->UpdateTitle();
|
frame->UpdateTitle();
|
||||||
|
|
|
@ -4,26 +4,26 @@ import unittest
|
||||||
class TestLoadSave(unittest.TestCase):
|
class TestLoadSave(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.TITLE="Test Board"
|
self.TITLE="Test Board"
|
||||||
self.COMMENT1="For load/save test"
|
self.COMMENT1="For load/save test"
|
||||||
self.FILENAME="/tmp/test.brd"
|
self.FILENAME="/tmp/test.brd"
|
||||||
|
|
||||||
def test_00_save(self):
|
def test_00_save(self):
|
||||||
pcb = BOARD()
|
pcb = BOARD()
|
||||||
pcb.GetTitleBlock().SetTitle(self.TITLE)
|
pcb.GetTitleBlock().SetTitle(self.TITLE)
|
||||||
pcb.GetTitleBlock().SetComment1(self.COMMENT1)
|
pcb.GetTitleBlock().SetComment1(self.COMMENT1)
|
||||||
result = SaveBoard(self.FILENAME,pcb)
|
result = SaveBoard(self.FILENAME,pcb)
|
||||||
self.assertTrue(result)
|
self.assertTrue(result)
|
||||||
|
|
||||||
def test_01_load(self):
|
def test_01_load(self):
|
||||||
pcb2 = LoadBoard(self.FILENAME)
|
pcb2 = LoadBoard(self.FILENAME)
|
||||||
self.assertIsNotNone(pcb2)
|
self.assertIsNotNone(pcb2)
|
||||||
|
|
||||||
def test_02_titleblock_ok(self):
|
def test_02_titleblock_ok(self):
|
||||||
pcb2 = LoadBoard(self.FILENAME)
|
pcb2 = LoadBoard(self.FILENAME)
|
||||||
tb = pcb2.GetTitleBlock()
|
tb = pcb2.GetTitleBlock()
|
||||||
self.assertEqual(tb.GetTitle(),self.TITLE)
|
self.assertEqual(tb.GetTitle(),self.TITLE)
|
||||||
self.assertEqual(tb.GetComment1(),self.COMMENT1)
|
self.assertEqual(tb.GetComment1(),self.COMMENT1)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
Loading…
Reference in New Issue