Changed i++ to ++i in the loops in the tests for TfIdfweight.