defined the chromatic symmetric function of a simple graph and has conjectured that every tree is determined by its chromatic symmetric function. Recently, Takahiro Hasebe and the author proved that the order quasisymmetric functions, which are analogs of the chromatic symmetric functions, distinguish rooted trees. In this paper, using a similar method, we prove that the chromatic symmetric functions distinguish trivially perfect graphs. Moreover, we also prove that claw-free cographs, that is, {K 1,3 , P 4 }-free graphs belong to a known class of e-positive graphs.