More testing of bcd_set_random. Moved function to bcd_lib.