You don't need to have a DUE to be able to compile the code for a DUE board.
The teensy 3.1 does have fewer i/o pins and is not shield compatible (because of its much smaller size),
half the flash and 2/3 the RAM but it has 21 analog input pins vs 12 on DUE and the biggest nice thing
on the Teensy is 5v tolerance which means you can hook up to 5v output signals.
If you do that on a DUE you blow up the processor.
--- bill