Test struct type matching for uniforms.

kbr: please ignore the previous pull request and use this one instead (I messed up my old git branch, so had to create this new one).

The difference is I also added field type mis-match test in this, as you suggested.