xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.betterc/test19924.d (revision d16b7486a53dcb8072b60ec6fcb4373a2d0c27b7)
1 /*******************************************/
2 // https://issues.dlang.org/show_bug.cgi?id=19924
3 
4 import core.bitop;
5 
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