TCM determine the food is heaty or cooling by the symptoms of the illness associated with the over-consumption of these foods.
For example, durian is heaty because over-consumption of durian is associated with a sore throat. Conversely, watermelon is considered a cooling fruit because over-consumption of watermelon is associated with cough and colourless phlegm.