1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2012 - Scilab Enterprises - Adeline CARNIS
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- CLI SHELL MODE -->
// <-- Non-regression test for bug 7881 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=7881
//
// <-- Short Description -->
// In the lattn function, the second argument is a scalar
// =============================================================================
c = rand(1:50);
assert_checkfalse(execstr("lattn(10,[1 2], c)", "errcatch") == 0);
refMsg = msprintf(_("%s: Wrong size for input argument #%d: A scalar expected.\n"), "lattn", 2);
assert_checkerror("lattn(10,[1 2], c)", refMsg);
c1 = rand(10,3);
assert_checkfalse(execstr("lattn(2, 1, c1)", "errcatch") == 0);
refMsg = msprintf(_("%s: Wrong values for input arguments #%d and #%d.\n"), "lattn", 1,2);
assert_checkerror("lattn(2, 1, c1)", refMsg);
|