Testing Long Types

Component Testing for C

OneTest Embedded does not support 64-bit long types as standard. The long long and _int64 types do not exist in the C Testing Language. However, a workaround does permit the use of long types within a .ptu test script.

  1. Locate the ana/atus_c.def file in the TDP directory and verify that the following customization point exists.

#define _int64 long

If the line does not exist, you must add this customization point to the ana/atus_c.def file.

  1. Locate the following line:

#pragma attol sizeof(long)=32

and replace the line with the two following lines:

#pragma attol sizeof(long)=64

#pragma attol sizeof(int)=64

If the line does not exist, you must add both lines to the ana/atus_c.def file.

  1. Within the .ptu test script, append an L to the notation of initial and expected long values, and use h64 to format the results. For example:

VAR MyVarLong, long#h64, init = 0xAAAAAAAAAAAAAAAAL, ev = 0x0FFFFFFFFFFFFFFFL