Test Executive 2.0 for win3.1. Sequence info report a pass, but the view report show a fail Primary Software: LabWindows/CVI Add-ons>>Test ExecutivePrimary Software Version: 2.0 Primary Software Fixed Version: N/A Secondary Software:
Problem: Customer email: I am runnining Test Executive 2.0.1 for Windows 3.1 and using Labwindows 4.0.1 for Windows 3.1. I have found a problem in the TXENGINE.H file which causes the following problem. When running a test that creates a report (in Test Executive for Win 3.1 only) the sequence information will report a pass, but the report will show only fails. This can be duplicated by using the CPU.SQU file, and adding a report. The problem is from the following declaration in TXENGINE.H: /* Status: */ #if _NI_mswin16_ typedef enum {FAIL, PASS, SKIP, AGAIN, ABORT} Status; #else typedef int Status; enum { FAIL, PASS, SKIP, AGAIN, ABORT}; #endif In the 16 bit environment, the enum Status will be a 1 byte value. This causes a problem in txreport.c where the following: if (TX_GetResultAttribute(resultId, TXATTR_RESULT_TEST_RESULT, testResult)) value for testResult is a 4 byte value. In TX_GetResultAttribute in the txsavres.c file the following is used to "cast" the data to the appropriate type: case TXATTR_RESULT_TEST_RESULT: *((Status *)data) = target->testData->result; break; This casting of a 1 byte value on 4 byte data caused corruption of the value and therefore the erroneous result in the report. The question is why Status is being declared differently for the two environements. Please advise me as to what I can do to correct this problem. The need for the test application is immediate, must be a Win 3.1 solution, and need to use Test Executive. Solution: [9.23.98 WDM] - You should be able to modify the header file's enum to include a final member that gets assigned to an integer value that requires 4 bytes to represent. CVI for Win 3.1 will go with the smallest possible size (1-4 bytes) capable of holding the enum. Since the values go 1, 2, 3... if you do not specifically assign them, this will only require 1 byte. Win32 versions of CVI will always use 4-bytes to store enums, even if they do not need all of these bytes to hold the values. You will have to rebuild the static library used for the engine (in Watcom) to pick up the change, or just use the engine source files in the project instead of the library. Related Links: Attachments:
Report Date: 01/13/1998 Last Updated: 09/25/1998 Document ID: 15CFER6Q |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
