What is the proof for saying all the compounds-of-an-element (except few), to have the same oxidation number? Following statements are extracted from Puri, Sharma, and Kalia's Principles Of Inorganic Chemistry book:

In all hydrogen compounds (except hydrides of active metals), the oxidation number of hydrogen per atom is +1.
In all oxygen compounds (except hydrogen peroxide and other peroxides and superoxides), the oxidation number of oxygen per atom is -2.

Have Chemists tested the oxidation state of every compound (of hydrogen, Oxygen or any element considered to have fixed oxidation sate) in the universe, to say all the compounds (with few mentioned exceptions) of the considered element to have the fixed oxidation state?
Is there any proof or law for supporting above statements? Or is the author sloppy in not saying &quot;In all the known hydrogen/oxygen compounds&quot;?
This statement is a generalisation. As every generalisation it makes things simpler to remember but even here they give exceptions. Of course, chemists couldn't test all oxygen or hydrogen compounds. The assumption is based on electronegativity of atoms in the "usual" compounds. In OF2 oxygen is not in -2 oxydation state. Also in BH3 hydrogen is not +1. I would not even go as far as "In all the known hydrogen/oxygen compounds". "In most of known" would be enough.