#NEWLINE# def testVectorAndColourOutputs( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'n' ] = Gaffer . Node ( ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . V2fPlug ( 'v2f' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . V2iPlug ( 'v2i' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . V3fPlug ( 'v3f' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . V3iPlug ( 'v3i' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . Color3fPlug ( 'c3f' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'n' ] [ 'user' ] . addChild ( Gaffer . Color4fPlug ( 'c4f' , flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) ) #NEWLINE# s [ 'e' ] = Gaffer . Expression ( ) #NEWLINE# s [ 'e' ] . setExpression ( 'import IECore;parent["n"]["user"]["v2f"] = IECore.V2f( 1, 2 );parent["n"]["user"]["v2i"] = IECore.V2i( 3, 4 );parent["n"]["user"]["v3f"] = IECore.V3f( 4, 5, 6 );parent["n"]["user"]["v3i"] = IECore.V3i( 6, 7, 8 );parent["n"]["user"]["c3f"] = IECore.Color3f( 9, 10, 11 );parent["n"]["user"]["c4f"] = IECore.Color4f( 12, 13, 14, 15 );' ) #NEWLINE# def assertExpectedValues( script ) : #NEWLINE# #INDENT# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'v2f' ] . getValue ( ) , IECore . V2f ( 1 , 2 ) ) #NEWLINE# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'v2i' ] . getValue ( ) , IECore . V2i ( 3 , 4 ) ) #NEWLINE# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'v3f' ] . getValue ( ) , IECore . V3f ( 4 , 5 , 6 ) ) #NEWLINE# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'v3i' ] . getValue ( ) , IECore . V3i ( 6 , 7 , 8 ) ) #NEWLINE# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'c3f' ] . getValue ( ) , IECore . Color3f ( 9 , 10 , 11 ) ) #NEWLINE# self . assertEqual ( script [ 'n' ] [ 'user' ] [ 'c4f' ] . getValue ( ) , IECore . Color4f ( 12 , 13 , 14 , 15 ) ) #NEWLINE# #UNINDENT# assertExpectedValues ( s2 ) #NEWLINE# s2 = Gaffer . ScriptNode ( ) #NEWLINE# s2 . execute ( s . serialise ( ) ) #NEWLINE# assertExpectedValues ( s2 )