.


:




:

































 

 

 

 





. , , . , FAIL. , . FAIL, . . :

Bool script_status = true

Matrix M = GenerateInputData()

For i ß 1 to M.rows do

Result expected = GetExptected(M[i])

Result actual = SendRequest(M[i])

Bool status = Compare(expected, actual)

If status = false

Then sctipt_status = false

LogResult(file,i,actual, expected,status)

LogScriptStatus(script_status)

 

GenerateInputData() . . . - , . - , FAIL. script_status, -.

 

C, , , , , . :

void NV_Read(char *destination, long length, long offset);

void NV_Write(char *source, long length, long offset);

destination , , source , , length , offset .

:

long currentOffset;

void initStack()

{

currentOffset=0;

}

void push(int value)

{

NV_Write((int*)&value,sizeof(int),currentOffset);

currentOffset+=sizeof(int);

}

int pop()

{

int value;

if (currentOffset>0)

{

NV_Read((int*)&value,sizeof(int),currentOffset;

currentOffset-=sizeof(int);

}

}

, , , , .

, , . :

char nvrom[1024];

 

void NV_Read(char *destination, long length, long offset)

{

printf(NV_Read called\n);

memcpy(destination, nvrom+offset, length);

}

void NV_Write(char *source, long length, long offset);

{

printf(NV_Write called\n);

memcpy(nvrom+offset, source, length);

}

, ( NV_Write) , , ( NV_Read).

( ) ( ) 29.

 

 

 


29

 





:


: 2015-10-01; !; : 1310 |


:

:

, - , ; , - .
==> ...

1286 - | 1319 -


© 2015-2024 lektsii.org - -

: 0.007 .