00001 # This file is Copyright 2003, 2006, 2007, 2009 Dean Hall. 00002 # 00003 # This file is part of the Python-on-a-Chip program. 00004 # Python-on-a-Chip is free software: you can redistribute it and/or modify 00005 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. 00006 # 00007 # Python-on-a-Chip is distributed in the hope that it will be useful, 00008 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00010 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 00011 # is seen in the file COPYING up one directory from this. 00012 00013 # 00014 # System Test 094 00015 # Fix image integer loading so it re-uses static ints (-1,0,1). 00016 # 00017 00018 kn1 = 1 - 2 00019 k0 = kn1 + 1 00020 k1 = k0 + 1 00021 00022 id1 = id(-1) 00023 id2 = id(kn1) 00024 assert id1 == id2 00025 00026 id1 = id(0) 00027 id2 = id(k0) 00028 assert id1 == id2 00029 00030 id1 = id(1) 00031 id2 = id(k1) 00032 assert id1 == id2