xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.betterc/test19924.d (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 /*******************************************/
2 // https://issues.dlang.org/show_bug.cgi?id=19924
3 
4 import core.bitop;
5 
main()6 extern(C) void main()
7 {
8     uint a = 0x01_23_45_67;
9     a = bswap(a);
10     assert(a == 0x67_45_23_01);
11 
12     ulong b = 0x01_23_45_67_89_ab_cd_ef;
13     b = bswap(b);
14     assert(b == 0xef_cd_ab_89_67_45_23_01);
15 }
16