Ticket #6134: BCursorTesterFix.patch

File BCursorTesterFix.patch, 3.5 KB (added by Karvjorm, 10 years ago)

Removing obsolete tests in BCursorTester

  • src/tests/kits/app/bcursor/BCursorTester.cpp

     
    1 //------------------------------------------------------------------------------
     1//-----------------------------------------------------------------------------
    22//  BCursorTester.cpp
    33//
    4 //------------------------------------------------------------------------------
     4//-----------------------------------------------------------------------------
    55
    6 // Standard Includes -----------------------------------------------------------
     6// Standard Includes ----------------------------------------------------------
    77
    8 // System Includes -------------------------------------------------------------
     8// System Includes ------------------------------------------------------------
    99#include <Application.h>
    1010#include <Cursor.h>
    1111#include <Message.h>
    1212
    1313#define CHK CPPUNIT_ASSERT
    1414
    15 // Project Includes ------------------------------------------------------------
     15// Project Includes -----------------------------------------------------------
    1616
    17 // Local Includes --------------------------------------------------------------
     17// Local Includes -------------------------------------------------------------
    1818#include "BCursorTester.h"
    1919
    20 // Local Defines ---------------------------------------------------------------
     20// Local Defines --------------------------------------------------------------
    2121
    22 // Globals ---------------------------------------------------------------------
     22// Globals --------------------------------------------------------------------
    2323
    24 //------------------------------------------------------------------------------
     24//-----------------------------------------------------------------------------
    2525
    2626/*
    2727    BCursor(const void *cursorData)
     
    174174  CHK(cur.Archive(&msg) == B_OK);
    175175}
    176176
    177 /*
    178     status_t Perform(perform_code d, void* arg)
    179     @case 1
    180     @results        return B_OK
    181  */
    182 void BCursorTester::Perform1()
    183 {
    184   BApplication app("application/x-vnd.cursortest");
    185   char data[68];
    186   int i;
    187177
    188   data[0] = 16;
    189   data[1] = 1;
    190   data[2] = 0;
    191   data[3] = 0;
    192   for (i=4; i<68; i++)
    193     data[i] = 1;
    194 
    195   BCursor cur(data);
    196   CHK(cur.Perform(0,NULL) == B_OK);
    197 }
    198 
    199 /*
    200     status_t Perform(perform_code d, void* arg)
    201     @case 2
    202     @results        return B_OK
    203  */
    204 void BCursorTester::Perform2()
    205 {
    206   BApplication app("application/x-vnd.cursortest");
    207   char data[68];
    208   int i;
    209 
    210   data[0] = 16;
    211   data[1] = 1;
    212   data[2] = 0;
    213   data[3] = 0;
    214   for (i=4; i<68; i++)
    215     data[i] = 1;
    216 
    217   BCursor cur(data);
    218   CHK(cur.Perform(0,&i) == B_OK);
    219 }
    220 
    221178Test* BCursorTester::Suite()
    222179{
    223180    TestSuite* SuiteOfTests = new TestSuite;
     
    231188    ADD_TEST4(BCursor, SuiteOfTests, BCursorTester, Instantiate2);
    232189    ADD_TEST4(BCursor, SuiteOfTests, BCursorTester, Archive1);
    233190    ADD_TEST4(BCursor, SuiteOfTests, BCursorTester, Archive2);
    234     ADD_TEST4(BCursor, SuiteOfTests, BCursorTester, Perform1);
    235     ADD_TEST4(BCursor, SuiteOfTests, BCursorTester, Perform2);
    236191
    237192    return SuiteOfTests;
    238193}
    239194
    240 
    241 
  • src/tests/kits/app/bcursor/BCursorTester.h

     
    3434        void Instantiate2();
    3535        void Archive1();
    3636        void Archive2();
    37         void Perform1();
    38         void Perform2();
    3937
    4038        static Test* Suite();
    4139};