diff options
Diffstat (limited to 'libphobos/testsuite/libphobos.betterc/test19924.d')
-rw-r--r-- | libphobos/testsuite/libphobos.betterc/test19924.d | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libphobos/testsuite/libphobos.betterc/test19924.d b/libphobos/testsuite/libphobos.betterc/test19924.d new file mode 100644 index 0000000..e9a93ca --- /dev/null +++ b/libphobos/testsuite/libphobos.betterc/test19924.d @@ -0,0 +1,15 @@ +/*******************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19924 + +import core.bitop; + +extern(C) void main() +{ + uint a = 0x01_23_45_67; + a = bswap(a); + assert(a == 0x67_45_23_01); + + ulong b = 0x01_23_45_67_89_ab_cd_ef; + b = bswap(b); + assert(b == 0xef_cd_ab_89_67_45_23_01); +} |