Test cases
- Update `simple_pointer_cast_le.t` to do some pointer airthmetic at the byte-level of the 32-bit integer DGen - Updated the semantic test code generation for `simple_pointer_cast_le.t` to check for new values
This commit is contained in:
parent
98a0246ad2
commit
39f3980526
|
@ -826,8 +826,8 @@ int main()
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int retValue = thing();
|
int retValue = thing();
|
||||||
assert(t_e159019f766be1a175186a13f16bcfb7 == 4);
|
assert(t_e159019f766be1a175186a13f16bcfb7 == 256+4);
|
||||||
assert(retValue == 6);
|
assert(retValue == 256+4+2);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}`);
|
}`);
|
||||||
|
|
|
@ -11,6 +11,7 @@ int function(int* ptr)
|
||||||
{
|
{
|
||||||
byte* bytePtr = cast(byte*)ptr;
|
byte* bytePtr = cast(byte*)ptr;
|
||||||
*bytePtr = 2+2;
|
*bytePtr = 2+2;
|
||||||
|
*(bytePtr+1) = 1;
|
||||||
|
|
||||||
return (*ptr)+1*2;
|
return (*ptr)+1*2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue