MCPcopy Create free account
hub / github.com/ImageEngine/cortex / test

Method test

test/IECoreGL/ShaderLoaderTest.py:47–62  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

45class ShaderLoaderTest( unittest.TestCase ) :
46
47 def test( self ) :
48
49 sp = IECore.SearchPath( os.path.join( os.path.dirname( __file__ ), "shaders" ) )
50 l = IECoreGL.ShaderLoader( sp )
51
52 s = l.load( "3dLabs/Toon" )
53 self.assertTrue( s.typeName()=="IECoreGL::Shader" )
54
55 ss = l.load( "3dLabs/Toon" )
56 self.assertTrue( s.isSame( ss ) )
57
58 # shader is too complicated for my graphics card
59 s = l.load( "3dLabs/Mandel" )
60 self.assertTrue( s.typeName()=="IECoreGL::Shader" )
61
62 self.assertTrue( IECoreGL.ShaderLoader.defaultShaderLoader().isSame( IECoreGL.ShaderLoader.defaultShaderLoader() ) )
63
64 def testPreprocessing( self ) :
65

Callers

nothing calls this directly

Calls 6

loadMethod · 0.95
SearchPathMethod · 0.80
joinMethod · 0.80
ShaderLoaderMethod · 0.80
typeNameMethod · 0.80
defaultShaderLoaderMethod · 0.80

Tested by

no test coverage detected