I was taught to test plants by,1-inspect it,some plants when old become toxic.2-smell it,take a little portion and crush it,if it smells like peaches or bitter almonds don't eat it,3-check for skin irritation by rubbing or squeezing some juice onto a tender part of the body like you elbow or the underside of your arm between your armpit & elbow,4-if there's no irritation,place a small portion on the tip of your tongue,lips,corner of the mouth,underneath tongue and chew a small portion.If there's any dicomfort don't eat it.If it passes those tests,eat a small portion and wait a few hours without eating or drinking anything else-if there's no problem it's safe to eat.
If you do have stomach problems after eating it drinking hot water will help.Eating charcoal will help,also white wood ash mixed into a paste with water will help.
Alot of seeds and grains contains poisions,they can be tested the same way,but never swallow any until you know for sure if they are safe.
Be especially careful of fungi/mushrooms,there are some that are easily confused with edible ones.One of the worst ones is death cap,normally in 8-24hrs you violently sick-nausea,diarrhea,convulsions,etc.,a day later you seem to recover then about 90% of the time the person will die in 2-10 days from liver failure.