Funny thing about all of this, over the years of being mechanic and emissions inspector here in Ontario Canada, it seemed strange that the most difficult vehicles to pass the emissions tests were some of the specified imports above (domestics here are GM, Ford and Chrysler).
About a couple years ago, all tests were done by running your car on a dyno with the tailpipe sniffer. Since then you only need the OBD computer scan.
In simple terms, I mean this....
1. 1987 and under = no emission test needed
2. 1988 - 1997 = tailpipe sniff with 3 gas analyser for HC's, CO's and NOX. (today it is only a 2 speed idle for HC's and CO's since the change)
3. 1998 to present needs OBD computer scan now with all systems "ready and checked" by your vehicle's OBD self tests. (you can't simply erase the codes with a scanner and take it for a test)
This means, if your MIL/Check engine light is off and your vehicle's software is happy with what it sees for emissions, the MIL will stay off.
You car now passes the emissions test and you have an uncle named Bob.
As for diesel vehicles, it is simply a visual for black smoke from the tailpipe.
Again, this is the greater Toronto are of Ontario and many northern regions have different laws. I am sure all of the provinces vary with the regulations.