You can buy inexpensive electronic diamond detectors at places like amazon.com and eBay. They are useful devises and work by testing the material properties of a substance. They do, however, have a basic limitation: they can tell the difference between diamonds and simulant diamonds, but not between synthetic diamonds and natural diamonds.
Simulant diamonds are non-diamond materials like quartz, leaded glass and cubic zirchoniam that can superfically resemble diamonds. The electronic diamond detector identifies these as simulants as the have different material proprties than real diamonds.
Snythetic diamonds, on the other hand, are genuine diamonds, but they’re human made in a lab rather than geologically over time by nature. Synthetic and natural diamonds share the same material properties and the electronic diamond detector can’t tell them apart. To the detector, they’re both diamond.
Synthetic diamonds for jewelry is a recent phenomenom, so an electronic pocket detector will tell you if your grandmother’s wedding ring has a genuine natural diamond. There weren’t any synthetic diamonds in 1940. But in other circumstances, especially with modern jewelry and items purchased without certification or from sellers you don’t know, the detector can only tell that it is diamond, not synethic or natural.