How can one test that a signal is High-Z when simulating with Verilator?
I don't think so. I believe you can write the expression b === 'bz within your SystemVerilog code, and that returns true (1'b1) within your code when b should have had a z state, but the actual output gets converted to a 0.