# File tests/writertester.rb, line 100
    def expect_error(regex)
	io = Tempfile.new('writer_error')
	begin
	    writer = NQXML::Writer.new(io)
	    yield writer
	    assert_fail("expected exception '#{regex.source}'")
	rescue NQXML::WriterError => ex
	    assert_match($!, regex)
	ensure
	    io.close(true)
	end
    end