diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Mac/Demo/calldll | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/Demo/calldll')
-rw-r--r-- | Mac/Demo/calldll/testcalldll.py | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/Mac/Demo/calldll/testcalldll.py b/Mac/Demo/calldll/testcalldll.py index d4a4853..e0f6964 100644 --- a/Mac/Demo/calldll/testcalldll.py +++ b/Mac/Demo/calldll/testcalldll.py @@ -8,16 +8,16 @@ fss, ok = macfs.PromptGetFile("Show me calldll.ppc.slb") lib = calldll.getdiskfragment(fss, 'calldll.ppc.slb') -cdll_b_bbbbbbbb = calldll.newcall(lib.cdll_b_bbbbbbbb, 'Byte', 'InByte', 'InByte', - 'InByte', 'InByte','InByte', 'InByte','InByte', 'InByte') -cdll_h_hhhhhhhh = calldll.newcall(lib.cdll_h_hhhhhhhh, 'Short', 'InShort', 'InShort', - 'InShort', 'InShort','InShort', 'InShort','InShort', 'InShort') -cdll_l_llllllll = calldll.newcall(lib.cdll_l_llllllll, 'Long', 'InLong', 'InLong', - 'InLong', 'InLong','InLong', 'InLong','InLong', 'InLong') - +cdll_b_bbbbbbbb = calldll.newcall(lib.cdll_b_bbbbbbbb, 'Byte', 'InByte', 'InByte', + 'InByte', 'InByte','InByte', 'InByte','InByte', 'InByte') +cdll_h_hhhhhhhh = calldll.newcall(lib.cdll_h_hhhhhhhh, 'Short', 'InShort', 'InShort', + 'InShort', 'InShort','InShort', 'InShort','InShort', 'InShort') +cdll_l_llllllll = calldll.newcall(lib.cdll_l_llllllll, 'Long', 'InLong', 'InLong', + 'InLong', 'InLong','InLong', 'InLong','InLong', 'InLong') + cdll_N_ssssssss = calldll.newcall(lib.cdll_N_ssssssss, 'None', 'InString', 'InString', - 'InString', 'InString', 'InString', 'InString', 'InString', 'InString') - + 'InString', 'InString', 'InString', 'InString', 'InString', 'InString') + cdll_o_l = calldll.newcall(lib.cdll_o_l, 'OSErr', 'InLong') cdll_N_pp = calldll.newcall(lib.cdll_N_pp, 'None', 'InPstring', 'OutPstring') @@ -30,103 +30,103 @@ cdll_N_sH = calldll.newcall(lib.cdll_N_sH, 'None', 'InString', 'InHandle') print 'Test cdll_b_bbbbbbbb' rv = cdll_b_bbbbbbbb(1, 2, 3, 4, 5, 6, 7, 8) if rv == 36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_b_bbbbbbbb negative' rv = cdll_b_bbbbbbbb(-1, -2, -3, -4, -5, -6, -7, -8) if rv == -36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv + print 'Failed, returned', rv print 'Test cdll_h_hhhhhhhh' rv = cdll_h_hhhhhhhh(1, 2, 3, 4, 5, 6, 7, 8) if rv == 36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_h_hhhhhhhh negative' rv = cdll_h_hhhhhhhh(-1, -2, -3, -4, -5, -6, -7, -8) if rv == -36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv + print 'Failed, returned', rv print 'Test cdll_l_llllllll' rv = cdll_l_llllllll(1, 2, 3, 4, 5, 6, 7, 8) if rv == 36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_l_llllllll negative' rv = cdll_l_llllllll(-1, -2, -3, -4, -5, -6, -7, -8) if rv == -36: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_N_ssssssss' print 'Should print one two three four five six seven eight' rv = cdll_N_ssssssss('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight') if rv == None: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_o_l(0)' rv = cdll_o_l(0) if rv == None: - print 'ok.' + print 'ok.' else: - print 'Error, returned', rv - + print 'Error, returned', rv + print 'Test cdll_o_l(-100)' try: - rv = cdll_o_l(-100) - print 'Error, did not raise exception, returned', rv + rv = cdll_o_l(-100) + print 'Error, did not raise exception, returned', rv except MacOS.Error, arg: - if arg[0] == -100: - print 'ok.' - else: - print 'Error, returned incorrect exception arg:', arg[0] - + if arg[0] == -100: + print 'ok.' + else: + print 'Error, returned incorrect exception arg:', arg[0] + print 'Test cdll_N_pp' rv = cdll_N_pp('pascal string') if rv == 'Was: pascal string': - print 'ok.' + print 'ok.' else: - print 'Failed, returned', repr(rv) - + print 'Failed, returned', repr(rv) + print 'Test cdll_N_bb' rv = cdll_N_bb(-100) if rv == -100: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_N_hh' rv = cdll_N_hh(-100) if rv == -100: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv - + print 'Failed, returned', rv + print 'Test cdll_N_ll' rv = cdll_N_ll(-100) if rv == -100: - print 'ok.' + print 'ok.' else: - print 'Failed, returned', rv + print 'Failed, returned', rv print 'Test cdll_N_sH' h = Res.Resource('xyz') rv = cdll_N_sH('new data', h) if rv == None and h.data == 'new data': - print 'ok.' + print 'ok.' else: - print 'Failed, rv is', rv, 'and handle data is', repr(rv.data) + print 'Failed, rv is', rv, 'and handle data is', repr(rv.data) sys.exit(1) |