add binary sample in test cpp

add binary sample in test cpp