## Copyright (C) 2025
##
## This file is part of Octave.
##
## Octave is free software: you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## Octave is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Octave; see the file COPYING.  If not, see
## <https://www.gnu.org/licenses/>.

## -*- texinfo -*-
## @deftypefn {} {@var{results} =} runtests (@var{testFile})
## @deftypefnx {} {@var{results} =} runtests (@var{testClass})
## @deftypefnx {} {@var{results} =} runtests (@dots{}, @var{name}, @var{value})
## Run unit tests from test files or test classes.
##
## This is a convenience wrapper for @code{matlab.unittest.runtests} that
## makes @code{runtests} available at the top level, matching MATLAB's behavior.
##
## @var{testFile} can be a string or cell array of strings specifying test files.
## @var{testClass} can be a test class name or class object.
##
## @example
## @group
## results = runtests ('MyTest');
## results = runtests (@{'test1.m', 'test2.m'@});
## @end group
## @end example
##
## @seealso{matlab.unittest.runtests, matlab.unittest.TestCase}
## @end deftypefn

function results = runtests (varargin)
  ## Delegate to matlab.unittest.runtests
  results = matlab.unittest.runtests (varargin{:});
endfunction



