diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-15 22:03:55 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-15 22:03:55 +0100 |
commit | 897fe0c0d0e29875cfa32939237c9a6255c5d044 (patch) | |
tree | 9dd2dc8ea2fd07c465b12d81b01c946b8e8120b7 /tests/basics/builtin-hex.py | |
parent | d5323f07ff79c20644ff64a247adad54b510a9a9 (diff) | |
download | micropython-897fe0c0d0e29875cfa32939237c9a6255c5d044.tar.gz micropython-897fe0c0d0e29875cfa32939237c9a6255c5d044.zip |
py: Add builtin functions bin and oct, and some tests for them.
Diffstat (limited to 'tests/basics/builtin-hex.py')
-rw-r--r-- | tests/basics/builtin-hex.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/builtin-hex.py b/tests/basics/builtin-hex.py new file mode 100644 index 0000000000..7d1c98a7a9 --- /dev/null +++ b/tests/basics/builtin-hex.py @@ -0,0 +1,12 @@ +# test builtin hex function + +print(hex(1)) +print(hex(-1)) +print(hex(15)) +print(hex(-15)) + +print(hex(12345)) +print(hex(0x12345)) + +print(hex(12345678901234567890)) +print(hex(0x12345678901234567890)) |