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 051 00015 # Tests implementation of FOR_ITER bytecode 00016 # 00017 00018 00019 s = (2,5,6) 00020 n = 0 00021 for i in s: 00022 assert s[n] == i 00023 n += 1 00024 00025 00026 s = [2,5,6] 00027 n = 0 00028 for i in s: 00029 assert s[n] == i 00030 n += 1 00031 00032 00033 s = "256" 00034 n = 0 00035 for i in s: 00036 assert s[n] == i 00037 n += 1