#NEWLINE# def verify_nested_loops( setup_sim , ModelType ) : #NEWLINE# #INDENT# model = ModelType ( 3 ) #NEWLINE# ( model , sim ) = setup_sim ( model ) #NEWLINE# model . in_ [ 0 ] . value = 7 #NEWLINE# model . in_ [ 1 ] . value = 0 #NEWLINE# model . in_ [ 2 ] . value = 2 #NEWLINE# sim . eval_combinational ( ) #NEWLINE# assert ( ModelType . out [ 0 ] == 1 ) #NEWLINE# assert ( model . out [ 1 ] == 5 ) #NEWLINE# assert ( model . out [ 2 ] == 1 ) #NEWLINE# model . in_ [ 0 ] . value = 3 #NEWLINE# model . in_ [ 1 ] . value = 6 #NEWLINE# model . in_ [ 2 ] . value = 5 #NEWLINE# sim . eval_combinational ( ) #NEWLINE# assert ( model . out [ 0 ] == 5 ) #NEWLINE# assert ( model . out [ 1 ] == 3 ) #NEWLINE# assert ( model . out [ 2 ] == 6 )