{
if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH)
ga_concat(gap, (char_u *)"Pattern ");
+ else if (atype == ASSERT_NOTEQUAL)
+ ga_concat(gap, (char_u *)"Expected not equal to ");
else
ga_concat(gap, (char_u *)"Expected ");
if (exp_str == NULL)
}
else
ga_concat_esc(gap, exp_str);
- if (atype == ASSERT_MATCH)
- ga_concat(gap, (char_u *)" does not match ");
- else if (atype == ASSERT_NOTMATCH)
- ga_concat(gap, (char_u *)" does match ");
- else if (atype == ASSERT_NOTEQUAL)
- ga_concat(gap, (char_u *)" differs from ");
- else
- ga_concat(gap, (char_u *)" but got ");
- ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
- vim_free(tofree);
+ if (atype != ASSERT_NOTEQUAL)
+ {
+ if (atype == ASSERT_MATCH)
+ ga_concat(gap, (char_u *)" does not match ");
+ else if (atype == ASSERT_NOTMATCH)
+ ga_concat(gap, (char_u *)" does match ");
+ else
+ ga_concat(gap, (char_u *)" but got ");
+ ga_concat_esc(gap, tv2string(got_tv, &tofree, numbuf, 0));
+ vim_free(tofree);
+ }
}
}
call assert_notequal([1, 2, 3], s)
call assert_notequal('foo', s)
- call assert_match("Expected 'foo' differs from 'foo'", v:errors[0])
+ call assert_match("Expected not equal to 'foo'", v:errors[0])
call remove(v:errors, 0)
endfunc