diff options
| author | Dean Rasheed | 2025-08-06 08:41:11 +0000 |
|---|---|---|
| committer | Dean Rasheed | 2025-08-06 08:41:11 +0000 |
| commit | 8c7445a008109100f9784ea2d8e02cb6769dfb09 (patch) | |
| tree | 3087681a5833536c93f7b773feb93ec8f8364e3d /src/include/common | |
| parent | 225ebfe30a1ae9fda74f3d8f98ea6fa511b60624 (diff) | |
Convert src/tools/testint128.c into a test module.
This creates a new test module src/test/modules/test_int128 and moves
src/tools/testint128.c into it so that it can be built using the
normal build system, allowing the 128-bit integer arithmetic functions
in src/include/common/int128.h to be tested automatically. For now,
the tests are skipped on platforms that don't have native int128
support.
While at it, fix the test128 union in the test code: the "hl" member
of test128 was incorrectly defined to be a union instead of a struct,
which meant that the tests were only ever setting and checking half of
each 128-bit integer value.
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/CAEZATCWgBMc9ZwKMYqQpaQz2X6gaamYRB+RnMsUNcdMcL2Mj_w@mail.gmail.com
Diffstat (limited to 'src/include/common')
| -rw-r--r-- | src/include/common/int128.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/common/int128.h b/src/include/common/int128.h index a50f5709c29..f22530a164e 100644 --- a/src/include/common/int128.h +++ b/src/include/common/int128.h @@ -6,7 +6,7 @@ * We make use of the native int128 type if there is one, otherwise * implement things the hard way based on two int64 halves. * - * See src/tools/testint128.c for a simple test harness for this file. + * See src/test/modules/test_int128 for a simple test harness for this file. * * Copyright (c) 2017-2025, PostgreSQL Global Development Group * |
