patch 8.1.1861: only some assert functions can be used as a method

Problem:    Only some assert functions can be used as a method.
Solution:   Allow using most assert functions as a method.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index e7f870c..8144993 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -415,6 +415,7 @@
 // values for f_argtype; zero means it cannot be used as a method
 #define FEARG_1    1	    // base is the first argument
 #define FEARG_2    2	    // base is the second argument
+#define FEARG_3    3	    // base is the third argument
 #define FEARG_LAST 9	    // base is the last argument
 
 static funcentry_T global_functions[] =
@@ -434,18 +435,18 @@
 #ifdef FEAT_FLOAT
     {"asin",		1, 1, 0,	  f_asin},	// WJMc
 #endif
-    {"assert_beeps",	1, 2, 0,	  f_assert_beeps},
+    {"assert_beeps",	1, 2, FEARG_1,	  f_assert_beeps},
     {"assert_equal",	2, 3, FEARG_2,	  f_assert_equal},
     {"assert_equalfile", 2, 2, 0,	  f_assert_equalfile},
     {"assert_exception", 1, 2, 0,	  f_assert_exception},
-    {"assert_fails",	1, 3, 0,	  f_assert_fails},
-    {"assert_false",	1, 2, 0,	  f_assert_false},
-    {"assert_inrange",	3, 4, 0,	  f_assert_inrange},
-    {"assert_match",	2, 3, 0,	  f_assert_match},
+    {"assert_fails",	1, 3, FEARG_1,	  f_assert_fails},
+    {"assert_false",	1, 2, FEARG_1,	  f_assert_false},
+    {"assert_inrange",	3, 4, FEARG_3,	  f_assert_inrange},
+    {"assert_match",	2, 3, FEARG_2,	  f_assert_match},
     {"assert_notequal",	2, 3, FEARG_2,	  f_assert_notequal},
-    {"assert_notmatch",	2, 3, 0,	  f_assert_notmatch},
+    {"assert_notmatch",	2, 3, FEARG_2,	  f_assert_notmatch},
     {"assert_report",	1, 1, 0,	  f_assert_report},
-    {"assert_true",	1, 2, 0,	  f_assert_true},
+    {"assert_true",	1, 2, FEARG_1,	  f_assert_true},
 #ifdef FEAT_FLOAT
     {"atan",		1, 1, 0,	  f_atan},
     {"atan2",		2, 2, 0,	  f_atan2},
@@ -1134,6 +1135,15 @@
 	for (i = 1; i < argcount; ++i)
 	    argv[i + 1] = argvars[i];
     }
+    else if (global_functions[fi].f_argtype == FEARG_3)
+    {
+	// base value goes third
+	argv[0] = argvars[0];
+	argv[1] = argvars[1];
+	argv[2] = *basetv;
+	for (i = 2; i < argcount; ++i)
+	    argv[i + 1] = argvars[i];
+    }
     else
     {
 	// FEARG_1: base value goes first
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim
index 900710b..65a0ee4 100644
--- a/src/testdir/test_assert.vim
+++ b/src/testdir/test_assert.vim
@@ -3,20 +3,30 @@
 func Test_assert_false()
   call assert_equal(0, assert_false(0))
   call assert_equal(0, assert_false(v:false))
+  call assert_equal(0, v:false->assert_false())
 
   call assert_equal(1, assert_false(123))
   call assert_match("Expected False but got 123", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(1, 123->assert_false())
+  call assert_match("Expected False but got 123", v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_assert_true()
   call assert_equal(0, assert_true(1))
   call assert_equal(0, assert_true(123))
   call assert_equal(0, assert_true(v:true))
+  call assert_equal(0, v:true->assert_true())
 
   call assert_equal(1, assert_true(0))
   call assert_match("Expected True but got 0", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(1, 0->assert_true())
+  call assert_match("Expected True but got 0", v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_assert_equal()
@@ -141,6 +151,10 @@
   call assert_equal(1, assert_match('bar.*foo', 'foobar', 'wrong'))
   call assert_match('wrong', v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(1, 'foobar'->assert_match('bar.*foo', 'wrong'))
+  call assert_match('wrong', v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_notmatch()
@@ -150,6 +164,10 @@
   call assert_equal(1, assert_notmatch('foo', 'foobar'))
   call assert_match("Pattern 'foo' does match 'foobar'", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(1, 'foobar'->assert_notmatch('foo'))
+  call assert_match("Pattern 'foo' does match 'foobar'", v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_assert_fail_fails()
@@ -164,6 +182,10 @@
   call assert_equal(1, assert_fails('echo', '', 'echo command'))
   call assert_match("command did not fail: echo command", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(1, 'echo'->assert_fails('', 'echo command'))
+  call assert_match("command did not fail: echo command", v:errors[0])
+  call remove(v:errors, 0)
 endfunc
 
 func Test_assert_fails_in_try_block()
@@ -179,6 +201,12 @@
   call assert_equal(1, assert_beeps('normal 0'))
   call assert_match("command did not beep: normal 0", v:errors[0])
   call remove(v:errors, 0)
+
+  call assert_equal(0, 'normal h'->assert_beeps())
+  call assert_equal(1, 'normal 0'->assert_beeps())
+  call assert_match("command did not beep: normal 0", v:errors[0])
+  call remove(v:errors, 0)
+
   bwipe
 endfunc
 
@@ -195,6 +223,12 @@
   call assert_match("Expected range 5 - 7, but got 8", v:errors[0])
   call remove(v:errors, 0)
 
+  call assert_equal(0, 5->assert_inrange(5, 7))
+  call assert_equal(0, 7->assert_inrange(5, 7))
+  call assert_equal(1, 8->assert_inrange(5, 7))
+  call assert_match("Expected range 5 - 7, but got 8", v:errors[0])
+  call remove(v:errors, 0)
+
   call assert_fails('call assert_inrange(1, 1)', 'E119:')
 
   if has('float')
diff --git a/src/version.c b/src/version.c
index cf96d64..6af4442 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1861,
+/**/
     1860,
 /**/
     1859,