<s> """<STR_LIT>""" <EOL> import sys <EOL> import numpy as np <EOL> from vispy . app import Canvas <EOL> from vispy . testing import ( requires_application , requires_pyopengl , SkipTest , <EOL> run_tests_if_main , assert_equal , assert_true ) <EOL> from vispy . gloo import gl <EOL> def teardown_module ( ) : <EOL> gl . use_gl ( ) <EOL> @ requires_application ( ) <EOL> def test_functionality_desktop ( ) : <EOL> """<STR_LIT>""" <EOL> _test_functionality ( '<STR_LIT>' ) <EOL> @ requires_application ( ) <EOL> def test_functionality_proxy ( ) : <EOL> """<STR_LIT>""" <EOL> _test_functionality ( '<STR_LIT>' ) <EOL> @ requires_application ( ) <EOL> @ requires_pyopengl ( ) <EOL> def test_functionality_pyopengl ( ) : <EOL> """<STR_LIT>""" <EOL> _test_functionality ( '<STR_LIT>' ) <EOL> @ requires_application ( ) <EOL> def test_functionality_es2 ( ) : <EOL> """<STR_LIT>""" <EOL> if True : <EOL> raise SkipTest ( '<STR_LIT>' ) <EOL> if not sys . platform . startswith ( '<STR_LIT>' ) : <EOL> raise SkipTest ( '<STR_LIT>' ) <EOL> _test_functionality ( '<STR_LIT>' ) <EOL> def _clear_screen ( ) : <EOL> gl . glClear ( gl . GL_COLOR_BUFFER_BIT ) <EOL> gl . glFinish ( ) <EOL> def _test_functionality ( backend ) : <EOL> """<STR_LIT>""" <EOL> gl . use_gl ( backend ) <EOL> with Canvas ( ) as canvas : <EOL> _clear_screen ( ) <EOL> w , h = canvas . size <EOL> gl . glViewport ( <NUM_LIT:0> , <NUM_LIT:0> , w , h ) <EOL> gl . glScissor ( <NUM_LIT:0> , <NUM_LIT:0> , w , h ) <EOL> gl . glClearColor ( <NUM_LIT:0.0> , <NUM_LIT:0.0> , <NUM_LIT:0.0> , <NUM_LIT:1.0> ) <EOL> objects = _prepare_vis ( ) <EOL> _clear_screen ( ) <EOL> _draw1 ( ) <EOL> _clear_screen ( ) <EOL> _draw2 ( ) <EOL> _clear_screen ( ) <EOL> _draw3 ( ) <EOL> for delete_func , handle in objects : <EOL> delete_func ( handle ) <EOL> gl . glFinish ( ) <EOL> VERT = """<STR_LIT>""" <EOL> FRAG = """<STR_LIT>""" <EOL> texquad = <NUM_LIT:5> <EOL> im1 = np . zeros ( ( texquad * <NUM_LIT:2> , texquad * <NUM_LIT:2> , <NUM_LIT:3> ) , np . uint8 ) <EOL> im1 [ texquad : , : texquad , <NUM_LIT:0> ] = <NUM_LIT> <EOL> im1 [ texquad : , texquad : , <NUM_LIT:1> ] = <NUM_LIT> <EOL> im1 [ : texquad , texquad : , <NUM_LIT:2> ] = <NUM_LIT> <EOL> im2 = im1 [ : , : , <NUM_LIT:0> ] <EOL> assert im2 . flags [ '<STR_LIT>' ] is False <EOL> quad = np . array ( [ [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ] , [ - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ] , [ - <NUM_LIT:1> , - <NUM_LIT:1> , <NUM_LIT:0> ] , <EOL> [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ] , [ - <NUM_LIT:1> , - <NUM_LIT:1> , <NUM_LIT:0> ] , [ <NUM_LIT:0> , - <NUM_LIT:1> , <NUM_LIT:0> ] ] , np . float32 ) <EOL> N = quad . shape [ <NUM_LIT:0> ] * <NUM_LIT:4> <EOL> buf3 = np . row_stack ( [ quad + ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) , quad + ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , <EOL> quad + ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> ) , quad + ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) ] ) . astype ( np . float32 ) <EOL> buf2 = ( ( buf3 + <NUM_LIT:1.0> ) * <NUM_LIT:0.5> ) [ : , : <NUM_LIT:2> ] <EOL> assert buf2 . flags [ '<STR_LIT>' ] is False <EOL> buf4 = np . zeros ( ( N , <NUM_LIT:5> ) , np . float32 ) <EOL> buf4 [ <NUM_LIT:6> : <NUM_LIT:12> , <NUM_LIT:0> ] = <NUM_LIT:0.5> <EOL> buf4 [ <NUM_LIT:12> : <NUM_LIT> , <NUM_LIT:1> ] = <NUM_LIT:0.5> <EOL> buf4 [ <NUM_LIT> : <NUM_LIT> , <NUM_LIT:2> ] = <NUM_LIT:0.5> <EOL> buf4 [ : , <NUM_LIT:3> ] = <NUM_LIT:1.0> <EOL> buf4 = buf4 [ : , : <NUM_LIT:4> ] <EOL> elements = np . arange ( <NUM_LIT:0> , N , <NUM_LIT:0.5> ) . astype ( np . uint8 ) [ : : <NUM_LIT:2> ] <EOL> helements = None <EOL> def _prepare_vis ( ) : <EOL> objects = [ ] <EOL> hprog = gl . glCreateProgram ( ) <EOL> hvert = gl . glCreateShader ( gl . GL_VERTEX_SHADER ) <EOL> hfrag = gl . glCreateShader ( gl . GL_FRAGMENT_SHADER ) <EOL> objects . append ( ( gl . glDeleteProgram , hprog ) ) <EOL> objects . append ( ( gl . glDeleteShader , hvert ) ) <EOL> objects . append ( ( gl . glDeleteShader , hfrag ) ) <EOL> gl . glShaderSource ( hvert , VERT ) <EOL> gl . glShaderSource ( hfrag , FRAG ) <EOL> gl . glCompileShader ( hvert ) <EOL> gl . glCompileShader ( hfrag ) <EOL> assert_equal ( gl . glGetShaderInfoLog ( hvert ) , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetShaderInfoLog ( hfrag ) , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetShaderParameter ( hvert , gl . GL_COMPILE_STATUS ) , <NUM_LIT:1> ) <EOL> assert_equal ( gl . glGetShaderParameter ( hfrag , gl . GL_COMPILE_STATUS ) , <NUM_LIT:1> ) <EOL> gl . glAttachShader ( hprog , hvert ) <EOL> gl . glAttachShader ( hprog , hfrag ) <EOL> gl . glDetachShader ( hprog , hvert ) <EOL> gl . glAttachShader ( hprog , hvert ) <EOL> gl . glBindAttribLocation ( hprog , <NUM_LIT:1> , '<STR_LIT>' ) <EOL> gl . glBindAttribLocation ( hprog , <NUM_LIT:2> , '<STR_LIT>' ) <EOL> gl . glBindAttribLocation ( hprog , <NUM_LIT:3> , '<STR_LIT>' ) <EOL> gl . glBindAttribLocation ( hprog , <NUM_LIT:4> , '<STR_LIT>' ) <EOL> gl . glLinkProgram ( hprog ) <EOL> attached_shaders = gl . glGetAttachedShaders ( hprog ) <EOL> assert_equal ( set ( attached_shaders ) , set ( [ hvert , hfrag ] ) ) <EOL> assert_equal ( gl . glGetProgramInfoLog ( hprog ) , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetProgramParameter ( hprog , gl . GL_LINK_STATUS ) , <NUM_LIT:1> ) <EOL> gl . glValidateProgram ( hprog ) <EOL> assert_equal ( gl . glGetProgramParameter ( hprog , gl . GL_VALIDATE_STATUS ) , <NUM_LIT:1> ) <EOL> gl . glUseProgram ( hprog ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> vert_source = gl . glGetShaderSource ( hvert ) <EOL> assert_true ( '<STR_LIT>' in vert_source ) <EOL> natt = gl . glGetProgramParameter ( hprog , gl . GL_ACTIVE_ATTRIBUTES ) <EOL> nuni = gl . glGetProgramParameter ( hprog , gl . GL_ACTIVE_UNIFORMS ) <EOL> assert_equal ( natt , <NUM_LIT:4> ) <EOL> assert_equal ( nuni , <NUM_LIT:4> + <NUM_LIT:4> + <NUM_LIT:3> + <NUM_LIT:1> ) <EOL> names = { } <EOL> for i in range ( natt ) : <EOL> name , count , type = gl . glGetActiveAttrib ( hprog , i ) <EOL> names [ name ] = type <EOL> assert_equal ( count , <NUM_LIT:1> ) <EOL> for i in range ( nuni ) : <EOL> name , count , type = gl . glGetActiveUniform ( hprog , i ) <EOL> names [ name ] = type <EOL> assert_equal ( count , <NUM_LIT:1> ) <EOL> assert_equal ( names [ '<STR_LIT>' ] , gl . GL_FLOAT ) <EOL> assert_equal ( names [ '<STR_LIT>' ] , gl . GL_FLOAT_VEC2 ) <EOL> assert_equal ( names [ '<STR_LIT>' ] , gl . GL_FLOAT_VEC3 ) <EOL> assert_equal ( names [ '<STR_LIT>' ] , gl . GL_FLOAT_VEC4 ) <EOL> assert_equal ( names [ '<STR_LIT>' ] , gl . GL_SAMPLER_2D ) <EOL> for i , type in enumerate ( [ gl . GL_FLOAT , gl . GL_FLOAT_VEC2 , <EOL> gl . GL_FLOAT_VEC3 , gl . GL_FLOAT_VEC4 ] ) : <EOL> assert_equal ( names [ '<STR_LIT>' % ( i + <NUM_LIT:1> ) ] , type ) <EOL> for i , type in enumerate ( [ gl . GL_INT , gl . GL_INT_VEC2 , <EOL> gl . GL_INT_VEC3 , gl . GL_INT_VEC4 ] ) : <EOL> assert_equal ( names [ '<STR_LIT>' % ( i + <NUM_LIT:1> ) ] , type ) <EOL> for i , type in enumerate ( [ gl . GL_FLOAT_MAT2 , gl . GL_FLOAT_MAT3 , <EOL> gl . GL_FLOAT_MAT4 ] ) : <EOL> assert_equal ( names [ '<STR_LIT>' % ( i + <NUM_LIT:2> ) ] , type ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> htex = gl . glCreateTexture ( ) <EOL> objects . append ( ( gl . glDeleteTexture , htex ) ) <EOL> gl . glPixelStorei ( gl . GL_UNPACK_ALIGNMENT , <NUM_LIT:1> ) <EOL> gl . glBindTexture ( gl . GL_TEXTURE_2D , htex ) <EOL> gl . glTexImage2D ( gl . GL_TEXTURE_2D , <NUM_LIT:0> , gl . GL_LUMINANCE , gl . GL_LUMINANCE , <EOL> gl . GL_UNSIGNED_BYTE , im2 ) <EOL> gl . glTexImage2D ( gl . GL_TEXTURE_2D , <NUM_LIT:0> , gl . GL_LUMINANCE , gl . GL_LUMINANCE , <EOL> gl . GL_UNSIGNED_BYTE , im2 . shape [ : <NUM_LIT:2> ] ) <EOL> gl . glTexSubImage2D ( gl . GL_TEXTURE_2D , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , gl . GL_LUMINANCE , <EOL> gl . GL_UNSIGNED_BYTE , im2 ) <EOL> T = gl . GL_TEXTURE_2D <EOL> gl . glTexParameterf ( T , gl . GL_TEXTURE_MIN_FILTER , gl . GL_LINEAR ) <EOL> gl . glTexParameteri ( T , gl . GL_TEXTURE_MAG_FILTER , gl . GL_LINEAR ) <EOL> gl . glTexImage2D ( gl . GL_TEXTURE_2D , <NUM_LIT:0> , gl . GL_RGB , gl . GL_RGB , <EOL> gl . GL_UNSIGNED_BYTE , im1 . shape [ : <NUM_LIT:2> ] ) <EOL> gl . glTexSubImage2D ( gl . GL_TEXTURE_2D , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> , gl . GL_RGB , <EOL> gl . GL_UNSIGNED_BYTE , im1 ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> unit = <NUM_LIT:0> <EOL> gl . glActiveTexture ( gl . GL_TEXTURE0 + unit ) <EOL> gl . glUniform1i ( loc , unit ) <EOL> gl . glGenerateMipmap ( gl . GL_TEXTURE_2D ) <EOL> minfilt = gl . glGetTexParameter ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_MIN_FILTER ) <EOL> assert_equal ( minfilt , gl . GL_LINEAR ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> hbuf2 = gl . glCreateBuffer ( ) <EOL> objects . append ( ( gl . glDeleteBuffer , hbuf2 ) ) <EOL> gl . glBindBuffer ( gl . GL_ARRAY_BUFFER , hbuf2 ) <EOL> gl . glBufferData ( gl . GL_ARRAY_BUFFER , buf2 . nbytes , gl . GL_DYNAMIC_DRAW ) <EOL> gl . glBufferSubData ( gl . GL_ARRAY_BUFFER , <NUM_LIT:0> , buf2 ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glDisableVertexAttribArray ( loc ) <EOL> gl . glEnableVertexAttribArray ( loc ) <EOL> gl . glVertexAttribPointer ( loc , <NUM_LIT:2> , gl . GL_FLOAT , False , <NUM_LIT:2> * <NUM_LIT:4> , <NUM_LIT:0> ) <EOL> size = gl . glGetBufferParameter ( gl . GL_ARRAY_BUFFER , gl . GL_BUFFER_SIZE ) <EOL> assert_equal ( size , buf2 . nbytes ) <EOL> stride = gl . glGetVertexAttrib ( loc , gl . GL_VERTEX_ATTRIB_ARRAY_STRIDE ) <EOL> assert_equal ( stride , <NUM_LIT:2> * <NUM_LIT:4> ) <EOL> offset = gl . glGetVertexAttribOffset ( loc , gl . GL_VERTEX_ATTRIB_ARRAY_POINTER ) <EOL> assert_equal ( offset , <NUM_LIT:0> ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> hbuf3 = gl . glCreateBuffer ( ) <EOL> objects . append ( ( gl . glDeleteBuffer , hbuf3 ) ) <EOL> gl . glBindBuffer ( gl . GL_ARRAY_BUFFER , hbuf3 ) <EOL> gl . glBufferData ( gl . GL_ARRAY_BUFFER , buf3 . nbytes , gl . GL_DYNAMIC_DRAW ) <EOL> gl . glBufferSubData ( gl . GL_ARRAY_BUFFER , <NUM_LIT:0> , buf3 ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glEnableVertexAttribArray ( loc ) <EOL> gl . glVertexAttribPointer ( loc , <NUM_LIT:3> , gl . GL_FLOAT , False , <NUM_LIT:3> * <NUM_LIT:4> , <NUM_LIT:0> ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> gl . glBindBuffer ( gl . GL_ARRAY_BUFFER , <NUM_LIT:0> ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glEnableVertexAttribArray ( loc ) <EOL> gl . glVertexAttribPointer ( loc , <NUM_LIT:4> , gl . GL_FLOAT , False , <NUM_LIT:4> * <NUM_LIT:4> , buf4 ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> global helements <EOL> helements = gl . glCreateBuffer ( ) <EOL> objects . append ( ( gl . glDeleteBuffer , helements ) ) <EOL> gl . glBindBuffer ( gl . GL_ELEMENT_ARRAY_BUFFER , helements ) <EOL> gl . glBufferData ( gl . GL_ELEMENT_ARRAY_BUFFER , elements , gl . GL_DYNAMIC_DRAW ) <EOL> gl . glBufferSubData ( gl . GL_ELEMENT_ARRAY_BUFFER , <NUM_LIT:0> , elements ) <EOL> gl . glBindBuffer ( gl . GL_ELEMENT_ARRAY_BUFFER , <NUM_LIT:0> ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> for i , fun1 , fun2 in [ ( <NUM_LIT:1> , gl . glUniform1i , gl . glUniform1iv ) , <EOL> ( <NUM_LIT:2> , gl . glUniform2i , gl . glUniform2iv ) , <EOL> ( <NUM_LIT:3> , gl . glUniform3i , gl . glUniform3iv ) , <EOL> ( <NUM_LIT:4> , gl . glUniform4i , gl . glUniform4iv ) ] : <EOL> name = '<STR_LIT>' % i <EOL> value = [ <NUM_LIT:0> ] * i <EOL> loc = gl . glGetUniformLocation ( hprog , name ) <EOL> fun1 ( loc , * value ) <EOL> fun2 ( loc , <NUM_LIT:1> , value ) <EOL> for i , fun1 , fun2 in [ ( <NUM_LIT:1> , gl . glUniform1f , gl . glUniform1fv ) , <EOL> ( <NUM_LIT:2> , gl . glUniform2f , gl . glUniform2fv ) , <EOL> ( <NUM_LIT:3> , gl . glUniform3f , gl . glUniform3fv ) , <EOL> ( <NUM_LIT:4> , gl . glUniform4f , gl . glUniform4fv ) ] : <EOL> name = '<STR_LIT>' % i <EOL> value = [ <NUM_LIT:1.0> ] * i <EOL> loc = gl . glGetUniformLocation ( hprog , name ) <EOL> fun1 ( loc , * value ) <EOL> fun2 ( loc , <NUM_LIT:1> , value ) <EOL> m = np . eye ( <NUM_LIT:5> , dtype = '<STR_LIT>' ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glUniformMatrix2fv ( loc , <NUM_LIT:1> , False , m [ : <NUM_LIT:2> , : <NUM_LIT:2> ] ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> m = np . eye ( <NUM_LIT:3> , dtype = '<STR_LIT>' ) <EOL> gl . glUniformMatrix3fv ( loc , <NUM_LIT:1> , False , m [ : <NUM_LIT:3> , : <NUM_LIT:3> ] ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> m = np . eye ( <NUM_LIT:4> , dtype = '<STR_LIT>' ) <EOL> gl . glUniformMatrix4fv ( loc , <NUM_LIT:1> , False , m [ : <NUM_LIT:4> , : <NUM_LIT:4> ] ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetUniform ( hprog , loc ) , <NUM_LIT:0> ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetUniform ( hprog , loc ) , ( <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> loc = gl . glGetUniformLocation ( hprog , '<STR_LIT>' ) <EOL> assert_equal ( gl . glGetUniform ( hprog , loc ) , ( <NUM_LIT:1.0> , <NUM_LIT:1.0> ) ) <EOL> assert_equal ( gl . glGetError ( ) , <NUM_LIT:0> ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glVertexAttrib1f ( loc , <NUM_LIT:1.0> ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glVertexAttrib2f ( loc , <NUM_LIT:1.0> , <NUM_LIT:1.0> ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glVertexAttrib3f ( loc , <NUM_LIT:1.0> , <NUM_LIT:1.0> , <NUM_LIT:1.0> ) <EOL> loc = gl . glGetAttribLocation ( hprog , '<STR_LIT>' ) <EOL> gl . glVertexAttrib4f ( loc , <NUM_LIT:1.0> , <NUM_LIT:1.0> , <NUM_LIT:1.0> , <NUM_LIT:1.0> ) <EOL> gl . glFlush ( ) <EOL> gl . glFinish ( ) <EOL> return objects <EOL> def _draw1 ( ) : <EOL> gl . glDrawArrays ( gl . GL_TRIANGLES , <NUM_LIT:0> , N ) <EOL> gl . glFinish ( ) <EOL> _check_result ( ) <EOL> def _draw2 ( ) : <EOL> gl . glBindBuffer ( gl . GL_ELEMENT_ARRAY_BUFFER , helements ) <EOL> gl . glDrawElements ( gl . GL_TRIANGLES , elements . size , gl . GL_UNSIGNED_BYTE , <NUM_LIT:0> ) <EOL> gl . glBindBuffer ( gl . GL_ELEMENT_ARRAY_BUFFER , <NUM_LIT:0> ) <EOL> gl . glFinish ( ) <EOL> _check_result ( ) <EOL> def _draw3 ( ) : <EOL> gl . glDrawElements ( gl . GL_TRIANGLES , <EOL> elements . size , gl . GL_UNSIGNED_BYTE , elements ) <EOL> gl . glFinish ( ) <EOL> _check_result ( ) <EOL> def _check_result ( assert_result = True ) : <EOL> """<STR_LIT>""" <EOL> x , y , w , h = gl . glGetParameter ( gl . GL_VIEWPORT ) <EOL> data = gl . glReadPixels ( x , y , w , h , gl . GL_RGB , gl . GL_UNSIGNED_BYTE ) <EOL> im = np . frombuffer ( data , np . uint8 ) <EOL> im . shape = h , w , <NUM_LIT:3> <EOL> pix1 = tuple ( im [ int ( <NUM_LIT:1> * h / <NUM_LIT:4> ) , int ( <NUM_LIT:1> * w / <NUM_LIT:4> ) ] ) <EOL> pix2 = tuple ( im [ int ( <NUM_LIT:3> * h / <NUM_LIT:4> ) , int ( <NUM_LIT:1> * w / <NUM_LIT:4> ) ] ) <EOL> pix3 = tuple ( im [ int ( <NUM_LIT:3> * h / <NUM_LIT:4> ) , int ( <NUM_LIT:3> * w / <NUM_LIT:4> ) ] ) <EOL> pix4 = tuple ( im [ int ( <NUM_LIT:1> * h / <NUM_LIT:4> ) , int ( <NUM_LIT:3> * w / <NUM_LIT:4> ) ] ) <EOL> if assert_result : <EOL> assert_equal ( pix1 , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> assert_equal ( pix2 , ( <NUM_LIT:255> , <NUM_LIT:0> , <NUM_LIT:0> ) ) <EOL> assert_equal ( pix3 , ( <NUM_LIT:0> , <NUM_LIT:255> , <NUM_LIT:0> ) ) <EOL> assert_equal ( pix4 , ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:255> ) ) <EOL> run_tests_if_main ( ) </s>
