St. Francis de Sales in his Treatise on the Love of God devotes the fourth book to describing how we may lose charity, and there notes how charity, which is properly a share we have in God's own love, produces a likeness of itself on the human level. So long as charity remains, this is all fine and as it ought to be, and charity indeed makes use of this human love. But a certain danger exists that one may fall away from charity, and be deceived by this merely human love into thinking that one still possesses charity.
When holy charity residents for a long time in a receptive soul, she produces a second love, which is not a love of charity, though it proceeds from charity; it is a human love, yet it is so much like charity that even if afterward charity perishes in the soul it seems to be still there, inasmuch as it leaves behind this picture and likeness of itself, which so represents charity that one who was ignorant would be thereby deceived. (Treatise on the Love of God, book IV, ch. 9)
When separated from charity, this human love, no longer being opened upon the unlimited and divine good, must be restricted in its scope. One is willing to do some things for this sake of this love, but not others.
And yet there is a great difference between charity and the human love it produces in us: for the voice of charity declares, impresses, and effects all the commandments of God in our hearts; the human love which remains after it does indeed sometimes declare and impress all the commandments, yet it never effects them all, but some few only. (Ibid.)
One who fails in watchfulness, who lets his commitments slide, as it were, and over a period of time neglects the love of God or neighbor, may not notice any sudden fall from charity, but may seem to themselves and to others to still be in a state of charity.
I have seen certain young people, well brought up in the love of God, who, putting themselves out of that path, remained for some time during their miserable decay still giving great signs of their past virtue, and, the habit acquired in time of charity resisting present vice, scarcely could one for some months discern whether they were out of charity or not, and whether they were virtuous or vicious, till such time as the course of things made it clear that these virtuous exercises proceeded not from present charity but from past, not from perfect but from imperfect love, which charity had left behind her, as a sign that she had lodged in those souls (ibid., ch. 10).
Hence, while this human love is certainly good, its capability of appearing as true charity is a danger for us, who may think we have charity when we do not.
Though this imperfect love be good in itself, yet it is perilous for us; for oftentimes we are contented with it alone, because having many exterior and interior marks of charity, we, thinking we have charity, deceive ourselves and think we are holy, while, in this vain persuasion, the sins which deprived us of charity increase, grow great, and multiply so fast that in the end they make themselves masters of our heart (ibid.).
The way to discern whether or not one loves with true charity, whether charity or merely its counterfeit is present, is by considering what would be willing to do for God, should friendship with God require it. If there is anything we would not be willing to do for God even if friendship with him demanded it, our love is not the true love of charity, but a merely human love that appears like it.
But, you will ask me, what means is there to discern whether it be Rachel or Lia, charity or imperfect love, which gives me the feelings of devotion wherewith I am touched? If when you examine in particular the objects of the desires, affections and designs which you have at the time, you find any one for which you would go against the will and good-pleasure of God by sinning mortally, it is then beyond doubt that all the feeling, all the facility and promptitude which you have in God's service, issue from no other source than human and imperfect love: for if perfect love reigned in us—Ah! it would break every affection, every desire, every design, the object of which was so pernicious, and it would not endure that your heart should behold it. (Ch. 11)
Though St. Francis de Sales does not explicitly speak about the other result of the examination–that one finds nothing for which one would go against the will and good-pleasure of God by sinning mortally–since the question is how to "discern whether it be… charity or imperfect love", it seems the logical conclusion that if in examining oneself, one finds nothing for which one would go against the will of God by sinning mortally (and the basic attitude one seeks to have toward God is one of love rather than, say, fear of hell), that one should have confidence that God's grace has kept one in his love.
One note of caution on this: St. Francis de Sales takes for granted that one has the capacity and willingness to make an honest examination of oneself; if one is unwillingly to examine oneself honestly before God and in God's light, then a lack of awareness of anything for which one would violate God's will by mortal sin would not seem to constitute particularly good evidence for the presence of charity.