forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RTL_APITEST] Move RtlIntSafe test from kmtest to rtl_apitest
- Loading branch information
Showing
5 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
|
||
list(APPEND SOURCE | ||
# To be filled | ||
RtlIntSafe.c | ||
) | ||
|
||
if(ARCH STREQUAL "i386") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ | |
* PROGRAMMER: Thomas Faber <[email protected]> | ||
*/ | ||
|
||
#define KMT_EMULATE_KERNEL | ||
#include <kmt_test.h> | ||
#include <rtltests.h> | ||
#define ENABLE_INTSAFE_SIGNED_FUNCTIONS | ||
#include <ntintsafe.h> | ||
|
||
|
@@ -76,7 +75,7 @@ START_TEST(RtlIntSafe) | |
|
||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, 0, 0, STATUS_SUCCESS); | ||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, 5, 5, STATUS_SUCCESS); | ||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, LONG_MAX, LONG_MAX, STATUS_SUCCESS); | ||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, INT_MAX, INT_MAX, STATUS_SUCCESS); | ||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, -1, (UINT)-1, STATUS_INTEGER_OVERFLOW); | ||
TEST_CONVERSION(Long, LONG, UInt, UINT, uint, LONG_MIN, (UINT)-1, STATUS_INTEGER_OVERFLOW); | ||
|
||
|
@@ -129,15 +128,15 @@ START_TEST(RtlIntSafe) | |
TEST_ADD(Int8, INT8, int, INT8_MIN, -1, (INT8)-1, STATUS_INTEGER_OVERFLOW); | ||
TEST_ADD(Int8, INT8, int, INT8_MIN, INT8_MIN, (INT8)-1, STATUS_INTEGER_OVERFLOW); | ||
|
||
TEST_ADD(LongLong, LONGLONG, longlong, 0, 0, 0, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 5, 5, 10, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 0, 0, (LONGLONG)0, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 5, 5, (LONGLONG)10, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 0, LONGLONG_MAX, LONGLONG_MAX, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, 0, LONGLONG_MAX, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX - 1, 1, LONGLONG_MAX, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, 1, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, INT8_MAX, (LONGLONG)-1, STATUS_INTEGER_OVERFLOW); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 0, -1, -1, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, -1, 0, -1, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 0, -1, (LONGLONG)-1, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, -1, 0, (LONGLONG)-1, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, 0, LONGLONG_MIN, LONGLONG_MIN, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MIN, 0, LONGLONG_MIN, STATUS_SUCCESS); | ||
TEST_ADD(LongLong, LONGLONG, longlong, LONGLONG_MAX, LONGLONG_MIN, (LONGLONG)-1, STATUS_SUCCESS); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters