view run/union_07.d @ 374:f87ba6507260

added missing meta-data
author thomask
date Thu, 31 Mar 2005 09:01:33 +0000
parents 9eec35fef572
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

module dstress.run.union_07;

union MyUnion{
	short s;
	byte b;
}

int main(){
	MyUnion u;
	u.b=0x12;
	version(LittleEndian){
		assert(u.s==0x0012);
	}else{
		assert(u.s==0x1200);
	}
	return 0;
}