Skip to content

Commit

Permalink
Add more FCQWORD tests (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Aug 9, 2024
1 parent 3c42572 commit 2cc9cd6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Classes/FCryptoTestMutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,8 @@ private final simulated function int TestAesCt()
return 0;
}

// TODO: refactor and clean up this.
// - move FCQWORD tests to dedicated suite
private final simulated function int TestSpeed()
{
local int Dummy;
Expand Down Expand Up @@ -1456,6 +1458,26 @@ private final simulated function int TestSpeed()
`fclog("0x7FFFFFFF < 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsLt_AsUInt32(0x7FFFFFFF, 0xFFFFFFFF));
`fclog("0xFFFFFFFF < 0x7FFFFFFF :" @ class'FCryptoQWORD'.static.IsLt_AsUInt32(0xFFFFFFFF, 0x7FFFFFFF));

`fclog("0x00000000 >= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x00000000, 0xFFFFFFFF));
`fclog("0xFFFFFFFF >= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0xFFFFFFFF, 0xFFFFFFFF));
`fclog("0x00000000 >= 0x00000000 :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x00000000, 0x00000000));
`fclog("0x7FFFFFFF >= 0x00000000 :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x7FFFFFFF, 0x00000000));
`fclog("0x00000000 >= 0x7FFFFFFF :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x00000000, 0x7FFFFFFF));
`fclog("0x00000001 >= 0x00000002 :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x00000001, 0x00000002));
`fclog("0x00000002 >= 0x00000001 :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x00000002, 0x00000001));
`fclog("0x7FFFFFFF >= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0x7FFFFFFF, 0xFFFFFFFF));
`fclog("0xFFFFFFFF >= 0x7FFFFFFF :" @ class'FCryptoQWORD'.static.IsGte_AsUInt32(0xFFFFFFFF, 0x7FFFFFFF));

`fclog("0x00000000 <= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x00000000, 0xFFFFFFFF));
`fclog("0xFFFFFFFF <= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0xFFFFFFFF, 0xFFFFFFFF));
`fclog("0x00000000 <= 0x00000000 :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x00000000, 0x00000000));
`fclog("0x7FFFFFFF <= 0x00000000 :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x7FFFFFFF, 0x00000000));
`fclog("0x00000000 <= 0x7FFFFFFF :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x00000000, 0x7FFFFFFF));
`fclog("0x00000001 <= 0x00000002 :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x00000001, 0x00000002));
`fclog("0x00000002 <= 0x00000001 :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x00000002, 0x00000001));
`fclog("0x7FFFFFFF <= 0xFFFFFFFF :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0x7FFFFFFF, 0xFFFFFFFF));
`fclog("0xFFFFFFFF <= 0x7FFFFFFF :" @ class'FCryptoQWORD'.static.IsLte_AsUInt32(0xFFFFFFFF, 0x7FFFFFFF));

QW1.A = 0x00000000;
QW1.B = 0xFFFFFFFF;
QW2.A = 0xFFFFFFFF;
Expand Down

0 comments on commit 2cc9cd6

Please sign in to comment.