test/testautomation_surface.c
author Andreas Schiffler <aschiffler@ferzkopp.net>
Mon, 03 Jun 2013 19:24:18 -0700
changeset 7268 b399d0441810
parent 7191 75360622e65f
child 7374 29ace61fca99
permissions -rw-r--r--
Add missing VS2012 test projects; update VS2010 and VS2012 solutions; update keybord suite for VS compiler warnings
     1 /**
     2  * Original code: automated SDL surface test written by Edgar Simo "bobbens"
     3  * Adapted/rewritten for test lib by Andreas Schiffler
     4  */
     5 
     6 /* Supress C4996 VS compiler warnings for unlink() */
     7 #define _CRT_SECURE_NO_DEPRECATE
     8 #define _CRT_NONSTDC_NO_DEPRECATE
     9 
    10 #include <stdio.h>
    11 #include <sys/stat.h>
    12 
    13 #include "SDL.h"
    14 #include "SDL_test.h"
    15 
    16 /* ================= Test Case Implementation ================== */
    17 
    18 /* Shared test surface */
    19 
    20 static SDL_Surface *referenceSurface = NULL;
    21 static SDL_Surface *testSurface = NULL;
    22 
    23 /* Helper functions for the test cases */
    24 
    25 #define TEST_SURFACE_WIDTH testSurface->w
    26 #define TEST_SURFACE_HEIGHT testSurface->h
    27 
    28 /* Fixture */
    29 
    30 /* Create a 32-bit writable surface for blitting tests */
    31 void
    32 _surfaceSetUp(void *arg)
    33 {
    34     int result;
    35     SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;
    36     SDL_BlendMode currentBlendMode;
    37     Uint32 rmask, gmask, bmask, amask;
    38 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
    39     rmask = 0xff000000;
    40     gmask = 0x00ff0000;
    41     bmask = 0x0000ff00;
    42     amask = 0x000000ff;
    43 #else
    44     rmask = 0x000000ff;
    45     gmask = 0x0000ff00;
    46     bmask = 0x00ff0000;
    47     amask = 0xff000000;
    48 #endif
    49 
    50     referenceSurface = SDLTest_ImageBlit(); /* For size info */
    51     testSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, referenceSurface->w, referenceSurface->h, 32, rmask, gmask, bmask, amask);
    52     SDLTest_AssertCheck(testSurface != NULL, "Check that testSurface is not NULL");
    53     if (testSurface != NULL) {
    54       /* Disable blend mode for target surface */
    55       result = SDL_SetSurfaceBlendMode(testSurface, blendMode);
    56       SDLTest_AssertCheck(result == 0, "Validate result from SDL_SetSurfaceBlendMode, expected: 0, got: %i", result);
    57       result = SDL_GetSurfaceBlendMode(testSurface, &currentBlendMode);
    58       SDLTest_AssertCheck(result == 0, "Validate result from SDL_GetSurfaceBlendMode, expected: 0, got: %i", result);
    59       SDLTest_AssertCheck(currentBlendMode == blendMode, "Validate blendMode, expected: %i, got: %i", blendMode, currentBlendMode);
    60     }
    61 }
    62 
    63 void
    64 _surfaceTearDown(void *arg)
    65 {
    66     if (referenceSurface != NULL) {
    67         SDL_FreeSurface(referenceSurface);
    68         referenceSurface = NULL;
    69     }
    70     if (testSurface != NULL) {
    71         SDL_FreeSurface(testSurface);
    72         testSurface = NULL;
    73     }
    74 }
    75 
    76 /**
    77  * Helper that clears the test surface
    78  */
    79 void _clearTestSurface()
    80 {
    81     int ret;
    82     Uint32 color;
    83 
    84     /* Clear surface. */
    85     color = SDL_MapRGBA( testSurface->format, 0, 0, 0, 0);
    86     SDLTest_AssertPass("Call to SDL_MapRGBA()");
    87     ret = SDL_FillRect( testSurface, NULL, color);
    88     SDLTest_AssertPass("Call to SDL_FillRect()");
    89     SDLTest_AssertCheck(ret == 0, "Verify result from SDL_FillRect, expected: 0, got: %i", ret);
    90 }
    91 
    92 /**
    93  * Helper that blits in a specific blend mode, -1 for basic blitting, -2 for color mod, -3 for alpha mod, -4 for mixed blend modes.
    94  */
    95 void _testBlitBlendMode(int mode)
    96 {
    97     int ret;
    98     int i, j, ni, nj;
    99     SDL_Surface *face;
   100     SDL_Rect rect;
   101     int nmode;
   102     SDL_BlendMode bmode;
   103     int checkFailCount1;
   104     int checkFailCount2;
   105     int checkFailCount3;
   106     int checkFailCount4;
   107 
   108     /* Check test surface */
   109     SDLTest_AssertCheck(testSurface != NULL, "Verify testSurface is not NULL");
   110     if (testSurface == NULL) return;
   111 
   112     /* Create sample surface */
   113     face = SDLTest_ImageFace();
   114     SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
   115     if (face == NULL) return;
   116 
   117         /* Reset alpha modulation */
   118     ret = SDL_SetSurfaceAlphaMod(face, 255);
   119     SDLTest_AssertPass("Call to SDL_SetSurfaceAlphaMod()");
   120     SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceAlphaMod(), expected: 0, got: %i", ret);
   121 
   122         /* Reset color modulation */
   123     ret = SDL_SetSurfaceColorMod(face, 255, 255, 255);
   124     SDLTest_AssertPass("Call to SDL_SetSurfaceColorMod()");
   125     SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceColorMod(), expected: 0, got: %i", ret);
   126 
   127         /* Reset color key */
   128     ret = SDL_SetColorKey(face, SDL_FALSE, 0);
   129     SDLTest_AssertPass("Call to SDL_SetColorKey()");
   130     SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey(), expected: 0, got: %i", ret);
   131 
   132     /* Clear the test surface */
   133         _clearTestSurface();
   134 
   135     /* Target rect size */
   136     rect.w = face->w;
   137     rect.h = face->h;
   138 
   139     /* Steps to take */
   140     ni = testSurface->w - face->w;
   141     nj = testSurface->h - face->h;
   142 
   143     /* Optionally set blend mode. */
   144     if (mode >= 0) {
   145         ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode );
   146         SDLTest_AssertPass("Call to SDL_SetSurfaceBlendMode()");
   147         SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i", mode, ret);
   148     }
   149 
   150     /* Test blend mode. */
   151     checkFailCount1 = 0;
   152     checkFailCount2 = 0;
   153     checkFailCount3 = 0;
   154     checkFailCount4 = 0;
   155     for (j=0; j <= nj; j+=4) {
   156       for (i=0; i <= ni; i+=4) {
   157         if (mode == -2) {
   158             /* Set color mod. */
   159             ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j );
   160             if (ret != 0) checkFailCount2++;
   161         }
   162         else if (mode == -3) {
   163             /* Set alpha mod. */
   164             ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i );
   165             if (ret != 0) checkFailCount3++;
   166         }
   167         else if (mode == -4) {
   168             /* Crazy blending mode magic. */
   169             nmode = (i/4*j/4) % 4;
   170             if (nmode==0) {
   171                 bmode = SDL_BLENDMODE_NONE;
   172             } else if (nmode==1) {
   173                 bmode = SDL_BLENDMODE_BLEND;
   174             } else if (nmode==2) {
   175                 bmode = SDL_BLENDMODE_ADD;
   176             } else if (nmode==3) {
   177                 bmode = SDL_BLENDMODE_MOD;
   178             }
   179             ret = SDL_SetSurfaceBlendMode( face, bmode );
   180             if (ret != 0) checkFailCount4++;
   181         }
   182 
   183          /* Blitting. */
   184          rect.x = i;
   185          rect.y = j;
   186          ret = SDL_BlitSurface( face, NULL, testSurface, &rect );
   187          if (ret != 0) checkFailCount1++;
   188       }
   189     }
   190     SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_BlitSurface, expected: 0, got: %i", checkFailCount1);
   191     SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i", checkFailCount2);
   192     SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetSurfaceAlphaMod, expected: 0, got: %i", checkFailCount3);
   193     SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i", checkFailCount4);
   194 
   195     /* Clean up */
   196     if (face != NULL) {
   197         SDL_FreeSurface(face);
   198         face = NULL;
   199     }
   200 }
   201 
   202 /* Helper to check that a file exists */
   203 void
   204 _AssertFileExist(const char *filename)
   205 {
   206     struct stat st;
   207     int ret = stat(filename, &st);
   208 
   209     SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename);
   210 }
   211 
   212 
   213 /* Test case functions */
   214 
   215 /**
   216  * @brief Tests sprite saving and loading
   217  */
   218 int
   219 surface_testSaveLoadBitmap(void *arg)
   220 {
   221     int ret;
   222     const char *sampleFilename = "testSaveLoadBitmap.bmp";
   223     SDL_Surface *face;
   224     SDL_Surface *rface;
   225 
   226     /* Create sample surface */
   227     face = SDLTest_ImageFace();
   228     SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
   229     if (face == NULL) return TEST_ABORTED;
   230 
   231     /* Delete test file; ignore errors */
   232     unlink(sampleFilename);
   233 
   234     /* Save a surface */
   235     ret = SDL_SaveBMP(face, sampleFilename);
   236     SDLTest_AssertPass("Call to SDL_SaveBMP()");
   237     SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SaveBMP, expected: 0, got: %i", ret);
   238     _AssertFileExist(sampleFilename);
   239 
   240     /* Load a surface */
   241     rface = SDL_LoadBMP(sampleFilename);
   242     SDLTest_AssertPass("Call to SDL_LoadBMP()");
   243     SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_LoadBMP is not NULL");
   244     if (rface != NULL) {
   245         SDLTest_AssertCheck(face->w == rface->w, "Verify width of loaded surface, expected: %i, got: %i", face->w, rface->w);
   246         SDLTest_AssertCheck(face->h == rface->h, "Verify height of loaded surface, expected: %i, got: %i", face->h, rface->h);
   247     }
   248 
   249     /* Delete test file; ignore errors */
   250     unlink(sampleFilename);
   251 
   252     /* Clean up */
   253     if (face != NULL) {
   254     SDL_FreeSurface(face);
   255     face = NULL;
   256     }
   257     if (rface != NULL) {
   258     SDL_FreeSurface(rface);
   259     rface = NULL;
   260     }
   261 
   262     return TEST_COMPLETED;
   263 }
   264 
   265 /*!
   266  *  Tests surface conversion.
   267  */
   268 int
   269 surface_testSurfaceConversion(void *arg)
   270 {
   271     SDL_Surface *rface = NULL, *face = NULL;
   272     int ret = 0;
   273 
   274     /* Create sample surface */
   275     face = SDLTest_ImageFace();
   276     SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
   277     if (face == NULL)
   278         return TEST_ABORTED;
   279 
   280     /* Set transparent pixel as the pixel at (0,0) */
   281     if (face->format->palette) {
   282        ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels);
   283        SDLTest_AssertPass("Call to SDL_SetColorKey()");
   284        SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret);
   285     }
   286 
   287     /* Convert to 32 bit to compare. */
   288     rface = SDL_ConvertSurface( face, testSurface->format, 0 );
   289     SDLTest_AssertPass("Call to SDL_ConvertSurface()");
   290     SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_ConvertSurface is not NULL");
   291 
   292     /* Compare surface. */
   293     ret = SDLTest_CompareSurfaces( rface, face, 0 );
   294     SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   295 
   296     /* Clean up. */
   297     if (face != NULL) {
   298         SDL_FreeSurface( face );
   299         face = NULL;
   300     }
   301     if (rface != NULL) {
   302         SDL_FreeSurface( rface );
   303         rface = NULL;
   304     }
   305 
   306     return TEST_COMPLETED;
   307 }
   308 
   309 
   310 /**
   311  * @brief Tests sprite loading. A failure case.
   312  */
   313 int
   314 surface_testLoadFailure(void *arg)
   315 {
   316     SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp");
   317     SDLTest_AssertCheck(face == NULL, "SDL_CreateLoadBmp");
   318 
   319     return TEST_COMPLETED;
   320 }
   321 
   322 /**
   323  * @brief Tests some blitting routines.
   324  */
   325 int
   326 surface_testBlit(void *arg)
   327 {
   328    int ret;
   329    SDL_Surface *compareSurface;
   330 
   331    /* Basic blitting */
   332    _testBlitBlendMode(-1);
   333 
   334    /* Verify result by comparing surfaces */
   335    compareSurface = SDLTest_ImageBlit();
   336    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   337    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   338 
   339    /* Clean up. */
   340    if (compareSurface != NULL) {
   341     SDL_FreeSurface( compareSurface );
   342    }
   343 
   344    return TEST_COMPLETED;
   345 }
   346 
   347 /**
   348  * @brief Tests some blitting routines with color mod
   349  */
   350 int
   351 surface_testBlitColorMod(void *arg)
   352 {
   353    int ret;
   354    SDL_Surface *compareSurface;
   355 
   356    /* Basic blitting with color mod */
   357    _testBlitBlendMode(-2);
   358 
   359    /* Verify result by comparing surfaces */
   360    compareSurface = SDLTest_ImageBlitColor();
   361    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   362    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   363 
   364    /* Clean up. */
   365    if (compareSurface != NULL) {
   366     SDL_FreeSurface( compareSurface );
   367    }
   368 
   369    return TEST_COMPLETED;
   370 }
   371 
   372 /**
   373  * @brief Tests some blitting routines with alpha mod
   374  */
   375 int
   376 surface_testBlitAlphaMod(void *arg)
   377 {
   378    int ret;
   379    SDL_Surface *compareSurface;
   380 
   381    /* Basic blitting with alpha mod */
   382    _testBlitBlendMode(-3);
   383 
   384    /* Verify result by comparing surfaces */
   385    compareSurface = SDLTest_ImageBlitAlpha();
   386    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   387    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   388 
   389    /* Clean up. */
   390    if (compareSurface != NULL) {
   391     SDL_FreeSurface( compareSurface );
   392    }
   393 
   394    return TEST_COMPLETED;
   395 }
   396 
   397 
   398 /**
   399  * @brief Tests some more blitting routines.
   400  */
   401 int
   402 surface_testBlitBlendNone(void *arg)
   403 {
   404    int ret;
   405    SDL_Surface *compareSurface;
   406 
   407    /* Basic blitting */
   408    _testBlitBlendMode(SDL_BLENDMODE_NONE);
   409 
   410    /* Verify result by comparing surfaces */
   411    compareSurface = SDLTest_ImageBlitBlendNone();
   412    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   413    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   414 
   415    /* Clean up. */
   416    if (compareSurface != NULL) {
   417     SDL_FreeSurface( compareSurface );
   418    }
   419 
   420    return TEST_COMPLETED;
   421 }
   422 
   423 /**
   424  * @brief Tests some more blitting routines.
   425  */
   426 int
   427 surface_testBlitBlendBlend(void *arg)
   428 {
   429    int ret;
   430    SDL_Surface *compareSurface;
   431 
   432    /* Blend blitting */
   433    _testBlitBlendMode(SDL_BLENDMODE_BLEND);
   434 
   435    /* Verify result by comparing surfaces */
   436    compareSurface = SDLTest_ImageBlitBlend();
   437    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   438    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   439 
   440    /* Clean up. */
   441    if (compareSurface != NULL) {
   442     SDL_FreeSurface( compareSurface );
   443    }
   444 
   445    return TEST_COMPLETED;
   446 }
   447 
   448 /**
   449  * @brief Tests some more blitting routines.
   450  */
   451 int
   452 surface_testBlitBlendAdd(void *arg)
   453 {
   454    int ret;
   455    SDL_Surface *compareSurface;
   456 
   457    /* Add blitting */
   458    _testBlitBlendMode(SDL_BLENDMODE_ADD);
   459 
   460    /* Verify result by comparing surfaces */
   461    compareSurface = SDLTest_ImageBlitBlendAdd();
   462    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   463    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   464 
   465    /* Clean up. */
   466    if (compareSurface != NULL) {
   467     SDL_FreeSurface( compareSurface );
   468    }
   469 
   470    return TEST_COMPLETED;
   471 }
   472 
   473 /**
   474  * @brief Tests some more blitting routines.
   475  */
   476 int
   477 surface_testBlitBlendMod(void *arg)
   478 {
   479    int ret;
   480    SDL_Surface *compareSurface;
   481 
   482    /* Mod blitting */
   483    _testBlitBlendMode(SDL_BLENDMODE_MOD);
   484 
   485    /* Verify result by comparing surfaces */
   486    compareSurface = SDLTest_ImageBlitBlendMod();
   487    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   488    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   489 
   490    /* Clean up. */
   491    if (compareSurface != NULL) {
   492       SDL_FreeSurface( compareSurface );
   493    }
   494 
   495    return TEST_COMPLETED;
   496 }
   497 
   498 /**
   499  * @brief Tests some more blitting routines with loop
   500  */
   501 int
   502 surface_testBlitBlendLoop(void *arg) {
   503 
   504    int ret;
   505    SDL_Surface *compareSurface;
   506 
   507    /* All blitting modes */
   508    _testBlitBlendMode(-4);
   509 
   510    /* Verify result by comparing surfaces */
   511    compareSurface = SDLTest_ImageBlitBlendAll();
   512    ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );
   513    SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
   514 
   515    /* Clean up. */
   516    if (compareSurface != NULL) {
   517      SDL_FreeSurface(compareSurface);
   518    }
   519 
   520    return TEST_COMPLETED;
   521 
   522 }
   523 
   524 /* ================= Test References ================== */
   525 
   526 /* Surface test cases */
   527 static const SDLTest_TestCaseReference surfaceTest1 =
   528         { (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED};
   529 
   530 static const SDLTest_TestCaseReference surfaceTest2 =
   531         { (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED};
   532 
   533 static const SDLTest_TestCaseReference surfaceTest3 =
   534         { (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED};
   535 
   536 static const SDLTest_TestCaseReference surfaceTest4 =
   537         { (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED};
   538 
   539 static const SDLTest_TestCaseReference surfaceTest5 =
   540         { (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED};
   541 
   542 static const SDLTest_TestCaseReference surfaceTest6 =
   543         { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED};
   544 
   545 static const SDLTest_TestCaseReference surfaceTest7 =
   546         { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED};
   547 
   548 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
   549 static const SDLTest_TestCaseReference surfaceTest8 =
   550         { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED};
   551 
   552 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
   553 static const SDLTest_TestCaseReference surfaceTest9 =
   554         { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED};
   555 
   556 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
   557 static const SDLTest_TestCaseReference surfaceTest10 =
   558         { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED};
   559 
   560 static const SDLTest_TestCaseReference surfaceTest11 =
   561         { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED};
   562 
   563 /* Sequence of Surface test cases */
   564 static const SDLTest_TestCaseReference *surfaceTests[] =  {
   565     &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5,
   566     &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, NULL
   567 };
   568 
   569 /* Surface test suite (global) */
   570 SDLTest_TestSuiteReference surfaceTestSuite = {
   571     "Surface",
   572     _surfaceSetUp,
   573     surfaceTests,
   574     _surfaceTearDown
   575 
   576 };