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 054 00015 # Tests lists and dicts with lengths > 8 to test underlying seglist. 00016 # 00017 00018 00019 l = range(9) 00020 assert l[0] == 0 00021 assert l[8] == 8 00022 assert l[-1] == 8 00023 00024 assert len(l) == 9 00025 00026 # TODO Activate once a solution for #47 is found 00027 #l.remove(0) 00028 #assert not 0 in l 00029 #assert 1 in l 00030 #assert len(l) == 8 00031 00032 00033 d = {} 00034 i = 9 00035 while i >= 0: 00036 d[i] = i 00037 i -= 1 00038 assert d[0] == 0 00039 assert d[9] == 9