#NEWLINE# def test_ReduceXOR( setup_sim ) : #NEWLINE# #INDENT# model = ReduceXOR ( 4 ) #NEWLINE# ( model , sim ) = setup_sim ( model ) #NEWLINE# for ( i , o ) in zip ( [ 15 , 10 , 5 , 0 , 9 , 14 , 13 , 11 , 7 , 1 , 2 , 4 , 8 ] , [ 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ] ) : #NEWLINE# #INDENT# model . in_ . value = i #NEWLINE# sim . eval_combinational ( ) #NEWLINE# assert ( model . out0 == o ) #NEWLINE# assert ( model . out1 == o )