#NEWLINE# def test_array_parameter( self ) : #NEWLINE# #INDENT# self . top . driver . add_objective ( 'comp.result' ) #NEWLINE# self . top . driver . add_parameter ( 'comp.x' ) #NEWLINE# self . top . driver . add_constraint ( 'comp.g <= 0' ) #NEWLINE# self . top . recorders = [ ListCaseRecorder ( ) ] #NEWLINE# self . top . run ( ) #NEWLINE# self . assertAlmostEqual ( self . top . comp . opt_objective , self . top . driver . eval_objective ( ) , places = 2 ) #NEWLINE# self . assertAlmostEqual ( self . top . comp . opt_design_vars [ 0 ] , self . top . comp . x [ 0 ] , places = 1 ) #NEWLINE# self . assertAlmostEqual ( self . top . comp . opt_design_vars [ 1 ] , self . top . comp . x [ 1 ] , places = 2 ) #NEWLINE# self . assertAlmostEqual ( self . top . comp . opt_design_vars [ 2 ] , self . top . comp . x [ 2 ] , places = 2 ) #NEWLINE# self . assertAlmostEqual ( self . top . comp . opt_design_vars [ 3 ] , self . top . comp . x [ 3 ] , places = 1 ) #NEWLINE# cases = self . top . recorders [ 0 ] . get_iterator ( ) #NEWLINE# end_case = self [ ( - 1 ) ] #NEWLINE# self . assertEqual ( self . top . comp . x [ 1 ] , end_case . get_input ( 'comp.x' ) [ 1 ] ) #NEWLINE# self . assertEqual ( self . top . comp . result , end_case . get_output ( '_pseudo_0.out0' ) )