tests
This commit is contained in:
parent
f8449ad2b6
commit
ea0dc8d0c8
2 changed files with 12 additions and 2 deletions
|
|
@ -209,8 +209,8 @@ class OFParamStmt(ParamStmt):
|
|||
self.a = a
|
||||
self.b = b
|
||||
|
||||
def to_gerber(self, settings):
|
||||
stmt = '%OF'
|
||||
def to_gerber(self):
|
||||
ret = '%OF'
|
||||
if self.a:
|
||||
ret += 'A' + decimal_string(self.a, precision=6)
|
||||
if self.b:
|
||||
|
|
|
|||
|
|
@ -85,3 +85,13 @@ def test_IPParamStmt_dump():
|
|||
stmt = {'param': 'IP', 'ip': 'NEG'}
|
||||
ip = IPParamStmt.from_dict(stmt)
|
||||
assert_equal(ip.to_gerber(), '%IPNEG*%')
|
||||
|
||||
|
||||
def test_OFParamStmt_dump():
|
||||
""" Test OFParamStmt to_gerber()
|
||||
"""
|
||||
stmt = {'param': 'OF', 'a': '0.1234567', 'b': '0.1234567'}
|
||||
of = OFParamStmt.from_dict(stmt)
|
||||
assert_equal(of.to_gerber(), '%OFA0.123456B0.123456*%')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue