SWIGTYPE && input typemaps now assume object has been moved
Replicated Java implementation. Fully implemented for: - C# - D - Guile - Javascript (UTL) - Lua - MzScheme - Octave (UTL) - Perl (UTL) - PHP - Python (UTL) - Ruby (UTL) - Tcl (UTL) PHP std::auto_ptr std::unique_ptr minor tweaks and testcase corrections
This commit is contained in:
parent
0634883089
commit
e139a36511
31 changed files with 931 additions and 46 deletions
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using cpp11_rvalue_reference_move_inputNamespace;
|
||||
|
||||
public class cpp11_rvalue_reference_move_input_runme {
|
||||
public static void Main() {
|
||||
{
|
||||
// Function containing rvalue reference parameter
|
||||
Counter.reset_counts();
|
||||
MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable.movein(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new ApplicationException("is_nullptr failed");
|
||||
mo.Dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move constructor test
|
||||
Counter.reset_counts();
|
||||
MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable mo_moved = new MovableCopyable(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new ApplicationException("is_nullptr failed");
|
||||
mo.Dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
mo_moved.Dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move assignment operator test
|
||||
Counter.reset_counts();
|
||||
MovableCopyable mo111 = new MovableCopyable(111);
|
||||
MovableCopyable mo222 = new MovableCopyable(222);
|
||||
Counter.check_counts(2, 0, 0, 0, 0, 0);
|
||||
mo111.MoveAssign(mo222);
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo222))
|
||||
throw new ApplicationException("is_nullptr failed");
|
||||
mo222.Dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
mo111.Dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// null check
|
||||
Counter.reset_counts();
|
||||
bool exception_thrown = false;
|
||||
try {
|
||||
MovableCopyable.movein(null);
|
||||
} catch (ArgumentNullException e) {
|
||||
if (!e.Message.Contains("MovableCopyable && is null"))
|
||||
throw new ApplicationException("incorrect exception message:" + e);
|
||||
exception_thrown = true;
|
||||
}
|
||||
if (!exception_thrown)
|
||||
throw new ApplicationException("Should have thrown null error");
|
||||
Counter.check_counts(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ public class runme
|
|||
li_std_wstring.test_reference(null);
|
||||
throw new Exception("NULL check failed");
|
||||
} catch (ArgumentNullException e) {
|
||||
if (!e.Message.Contains("type is null"))
|
||||
if (!e.Message.Contains("is null"))
|
||||
throw new Exception("Missing text " + e);
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
module cpp11_rvalue_reference_move_input_runme;
|
||||
|
||||
import cpp11_rvalue_reference_move_input.Counter;
|
||||
import cpp11_rvalue_reference_move_input.MovableCopyable;
|
||||
|
||||
void main() {
|
||||
{
|
||||
// Function containing rvalue reference parameter
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable.movein(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move constructor test
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable mo_moved = new MovableCopyable(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
mo_moved.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move assignment operator test
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo111 = new MovableCopyable(111);
|
||||
scope MovableCopyable mo222 = new MovableCopyable(222);
|
||||
Counter.check_counts(2, 0, 0, 0, 0, 0);
|
||||
mo111.MoveAssign(mo222);
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo222))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo222.dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
mo111.dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// null check
|
||||
Counter.reset_counts();
|
||||
bool exception_thrown = false;
|
||||
try {
|
||||
MovableCopyable.movein(null);
|
||||
} catch (Exception e) {
|
||||
if (!canFind(e.msg, "MovableCopyable && is null"))
|
||||
throw new Exception("incorrect exception message:" ~ e.msg);
|
||||
exception_thrown = true;
|
||||
}
|
||||
if (!exception_thrown)
|
||||
throw new Exception("Should have thrown null error");
|
||||
Counter.check_counts(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
module cpp11_rvalue_reference_move_input_runme;
|
||||
|
||||
import cpp11_rvalue_reference_move_input.Counter;
|
||||
import cpp11_rvalue_reference_move_input.MovableCopyable;
|
||||
import std.algorithm;
|
||||
|
||||
void main() {
|
||||
{
|
||||
// Function containing rvalue reference parameter
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable.movein(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move constructor test
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable mo_moved = new MovableCopyable(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
mo_moved.dispose();
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move assignment operator test
|
||||
Counter.reset_counts();
|
||||
scope MovableCopyable mo111 = new MovableCopyable(111);
|
||||
scope MovableCopyable mo222 = new MovableCopyable(222);
|
||||
Counter.check_counts(2, 0, 0, 0, 0, 0);
|
||||
mo111.MoveAssign(mo222);
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
if (!MovableCopyable.is_nullptr(mo222))
|
||||
throw new Exception("is_nullptr failed");
|
||||
mo222.dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
mo111.dispose();
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// null check
|
||||
Counter.reset_counts();
|
||||
bool exception_thrown = false;
|
||||
try {
|
||||
MovableCopyable.movein(null);
|
||||
} catch (Exception e) {
|
||||
if (!canFind(e.msg, "MovableCopyable && is null"))
|
||||
throw new Exception("incorrect exception message:" ~ e.msg);
|
||||
exception_thrown = true;
|
||||
}
|
||||
if (!exception_thrown)
|
||||
throw new Exception("Should have thrown null error");
|
||||
Counter.check_counts(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(dynamic-call "scm_init_cpp11_rvalue_reference_move_input_module" (dynamic-link "./libcpp11_rvalue_reference_move_input"))
|
||||
(load "testsuite.scm")
|
||||
(load "../schemerunme/cpp11_rvalue_reference_move_input.scm")
|
||||
|
|
@ -15,6 +15,7 @@ public class cpp11_rvalue_reference_move_input_runme {
|
|||
public static void main(String argv[]) {
|
||||
|
||||
{
|
||||
// Function containing rvalue reference parameter
|
||||
Counter.reset_counts();
|
||||
MovableCopyable mo = new MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
var cpp11_rvalue_reference_move_input = require("cpp11_rvalue_reference_move_input");
|
||||
|
||||
{
|
||||
// Function containing rvalue reference parameter
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts();
|
||||
mo = new cpp11_rvalue_reference_move_input.MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
cpp11_rvalue_reference_move_input.MovableCopyable.movein(mo);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
if (!cpp11_rvalue_reference_move_input.MovableCopyable.is_nullptr(mo))
|
||||
throw new Error("is_nullptr failed");
|
||||
delete mo;
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
// Move constructor test
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts();
|
||||
mo = new cpp11_rvalue_reference_move_input.MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
mo_moved = new cpp11_rvalue_reference_move_input.MovableCopyable(mo);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
if (!cpp11_rvalue_reference_move_input.MovableCopyable.is_nullptr(mo))
|
||||
throw new Error("is_nullptr failed");
|
||||
delete mo;
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
// delete mo_moved;
|
||||
// cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
// Above not deleting the C++ object(node v12) - can't reliably control GC - use the movein function instead to delete
|
||||
cpp11_rvalue_reference_move_input.MovableCopyable.movein(mo_moved);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 2, 0, 3);
|
||||
}
|
||||
|
||||
{
|
||||
// Move assignment operator test
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts();
|
||||
mo111 = new cpp11_rvalue_reference_move_input.MovableCopyable(111);
|
||||
mo222 = new cpp11_rvalue_reference_move_input.MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 0, 0);
|
||||
mo111.MoveAssign(mo222);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
if (!cpp11_rvalue_reference_move_input.MovableCopyable.is_nullptr(mo222))
|
||||
throw new Error("is_nullptr failed");
|
||||
delete mo222;
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
// delete mo111;
|
||||
// cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 2);
|
||||
// Above not deleting the C++ object(node v12) - can't reliably control GC - use the movein function instead to delete
|
||||
cpp11_rvalue_reference_move_input.MovableCopyable.movein(mo111);
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 1, 1, 3);
|
||||
}
|
||||
|
||||
{
|
||||
// null check
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts();
|
||||
exception_thrown = false;
|
||||
try {
|
||||
cpp11_rvalue_reference_move_input.MovableCopyable.movein(null);
|
||||
} catch (e) {
|
||||
if (!e.message.includes("invalid null reference"))
|
||||
throw new Error("incorrect exception message " + e.message);
|
||||
exception_thrown = true;
|
||||
}
|
||||
if (!exception_thrown)
|
||||
throw new Error("Should have thrown null error");
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
require("import") -- the import fn
|
||||
import("cpp11_rvalue_reference_move_input") -- import code
|
||||
|
||||
-- catch "undefined" global variables
|
||||
local env = _ENV -- Lua 5.2
|
||||
if not env then env = getfenv () end -- Lua 5.1
|
||||
setmetatable(env, {__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
|
||||
|
||||
-- Function containing rvalue reference parameter
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts()
|
||||
mo = cpp11_rvalue_reference_move_input.MovableCopyable(222)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
cpp11_rvalue_reference_move_input.MovableCopyable.movein(mo)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
if not (cpp11_rvalue_reference_move_input.MovableCopyable_is_nullptr(mo)) then
|
||||
error("is_nullptr failed")
|
||||
end
|
||||
mo = nil
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
|
||||
-- Move constructor test
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts()
|
||||
mo = cpp11_rvalue_reference_move_input.MovableCopyable(222)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
mo_moved = cpp11_rvalue_reference_move_input.MovableCopyable(mo)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
if not (cpp11_rvalue_reference_move_input.MovableCopyable_is_nullptr(mo)) then
|
||||
error("is_nullptr failed")
|
||||
end
|
||||
mo = nil
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
mo_moved = nil
|
||||
collectgarbage() -- gc nudge needed here
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
|
||||
-- Move assignment operator test
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts()
|
||||
mo111 = cpp11_rvalue_reference_move_input.MovableCopyable(111)
|
||||
mo222 = cpp11_rvalue_reference_move_input.MovableCopyable(222)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 0, 0)
|
||||
mo111:MoveAssign(mo222)
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
if not (cpp11_rvalue_reference_move_input.MovableCopyable_is_nullptr(mo222)) then
|
||||
error("is_nullptr failed")
|
||||
end
|
||||
mo222 = nil
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
mo111 = nil
|
||||
collectgarbage() -- gc nudge needed here
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(2, 0, 0, 0, 1, 2)
|
||||
|
||||
-- null check
|
||||
cpp11_rvalue_reference_move_input.Counter.reset_counts()
|
||||
s, msg = pcall(function() cpp11_rvalue_reference_move_input.MovableCopyable.movein(nil) end)
|
||||
assert(s == false and msg:find("Error in MovableCopyable::movein (arg 1), expected 'MovableCopyable &&' got 'nil'", 1, true))
|
||||
cpp11_rvalue_reference_move_input.Counter.check_counts(0, 0, 0, 0, 0, 0)
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
(load-extension "cpp11_rvalue_reference_move_input.so")
|
||||
(require (lib "defmacro.ss"))
|
||||
|
||||
; Copied from ../schemerunme/cpp11_rvalue_reference_move_input.scm and modified for exceptions
|
||||
|
||||
; Function containing rvalue reference parameter
|
||||
(Counter-reset-counts)
|
||||
(define mo (new-MovableCopyable 222))
|
||||
(Counter-check-counts 1 0 0 0 0 0)
|
||||
(MovableCopyable-movein mo)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
(unless (MovableCopyable-is-nullptr mo)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
|
||||
; Move constructor test
|
||||
(Counter-reset-counts)
|
||||
(define mo (new-MovableCopyable 222))
|
||||
(Counter-check-counts 1 0 0 0 0 0)
|
||||
(define mo_moved (new-MovableCopyable mo))
|
||||
(Counter-check-counts 1 0 0 1 0 1)
|
||||
(unless (MovableCopyable-is-nullptr mo)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo)
|
||||
(Counter-check-counts 1 0 0 1 0 1)
|
||||
(delete-MovableCopyable mo_moved)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
|
||||
; Move assignment operator test
|
||||
(Counter-reset-counts)
|
||||
(define mo111 (new-MovableCopyable 111))
|
||||
(define mo222 (new-MovableCopyable 222))
|
||||
(Counter-check-counts 2 0 0 0 0 0)
|
||||
(MovableCopyable-MoveAssign mo111 mo222)
|
||||
(Counter-check-counts 2 0 0 0 1 1)
|
||||
(unless (MovableCopyable-is-nullptr mo222)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo222)
|
||||
(Counter-check-counts 2 0 0 0 1 1)
|
||||
(delete-MovableCopyable mo111)
|
||||
(Counter-check-counts 2 0 0 0 1 2)
|
||||
|
||||
; null check
|
||||
(Counter-reset-counts)
|
||||
(define exception_thrown "no exception thrown for kin")
|
||||
(with-handlers ([exn:fail? (lambda (exn)
|
||||
(set! exception_thrown (exn-message exn)))])
|
||||
(MovableCopyable-movein '()))
|
||||
(unless (string=? exception_thrown "MovableCopyable-movein: swig-type-error (null reference)")
|
||||
(error (format "incorrect exception message: ~a" exception_thrown)))
|
||||
(Counter-check-counts 0 0 0 0 0 0)
|
||||
|
||||
(exit 0)
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# do not dump Octave core
|
||||
if exist("crash_dumps_octave_core", "builtin")
|
||||
crash_dumps_octave_core(0);
|
||||
endif
|
||||
|
||||
cpp11_rvalue_reference_move_input
|
||||
|
||||
# Function containing rvalue reference parameter
|
||||
Counter.reset_counts();
|
||||
mo = MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable.movein(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
if (!MovableCopyable_is_nullptr(mo))
|
||||
error("is_nullptr failed");
|
||||
endif
|
||||
clear mo;
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
|
||||
# Move constructor test
|
||||
Counter.reset_counts();
|
||||
mo = MovableCopyable(222);
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0);
|
||||
mo_moved = MovableCopyable(mo);
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
if (!MovableCopyable_is_nullptr(mo))
|
||||
error("is_nullptr failed");
|
||||
endif
|
||||
clear mo;
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1);
|
||||
clear mo_moved;
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2);
|
||||
|
||||
# Move assignment operator test
|
||||
Counter.reset_counts();
|
||||
mo111 = MovableCopyable(111);
|
||||
mo222 = MovableCopyable(222);
|
||||
Counter.check_counts(2, 0, 0, 0, 0, 0);
|
||||
mo111.MoveAssign(mo222);
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
if (!MovableCopyable_is_nullptr(mo222))
|
||||
error("is_nullptr failed");
|
||||
endif
|
||||
clear mo222;
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1);
|
||||
clear mo111;
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 2);
|
||||
|
||||
# null check
|
||||
null = []; # NULL pointer
|
||||
Counter.reset_counts();
|
||||
exception_thrown = false;
|
||||
try
|
||||
MovableCopyable.movein(null);
|
||||
catch e
|
||||
if (isempty(strfind(e.message, "invalid null reference")))
|
||||
error("incorrect exception message: %s", e.message)
|
||||
endif
|
||||
exception_thrown = true;
|
||||
end_try_catch
|
||||
if (!exception_thrown)
|
||||
error("Should have thrown null error");
|
||||
endif
|
||||
Counter.check_counts(0, 0, 0, 0, 0, 0);
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 6;
|
||||
BEGIN { use_ok('cpp11_rvalue_reference_move_input') }
|
||||
require_ok('cpp11_rvalue_reference_move_input');
|
||||
|
||||
{
|
||||
# Function containing rvalue reference parameter
|
||||
cpp11_rvalue_reference_move_input::Counter::reset_counts();
|
||||
my $mo = new cpp11_rvalue_reference_move_input::MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 0, 0, 0);
|
||||
cpp11_rvalue_reference_move_input::MovableCopyable::movein($mo);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
is(cpp11_rvalue_reference_move_input::MovableCopyable::is_nullptr($mo), 1, "is_nullptr check");
|
||||
undef $mo;
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
# Move constructor test
|
||||
cpp11_rvalue_reference_move_input::Counter::reset_counts();
|
||||
my $mo = new cpp11_rvalue_reference_move_input::MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 0, 0, 0);
|
||||
my $mo_moved = new cpp11_rvalue_reference_move_input::MovableCopyable($mo);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 1, 0, 1);
|
||||
is(cpp11_rvalue_reference_move_input::MovableCopyable::is_nullptr($mo), 1, "is_nullptr check");
|
||||
undef $mo;
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 1, 0, 1);
|
||||
undef $mo_moved;
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
}
|
||||
|
||||
{
|
||||
# Move assignment operator test
|
||||
cpp11_rvalue_reference_move_input::Counter::reset_counts();
|
||||
my $mo111 = new cpp11_rvalue_reference_move_input::MovableCopyable(111);
|
||||
my $mo222 = new cpp11_rvalue_reference_move_input::MovableCopyable(222);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(2, 0, 0, 0, 0, 0);
|
||||
$mo111->MoveAssign($mo222);
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(2, 0, 0, 0, 1, 1);
|
||||
is(cpp11_rvalue_reference_move_input::MovableCopyable::is_nullptr($mo222), 1, "is_nullptr check");
|
||||
undef $mo222;
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(2, 0, 0, 0, 1, 1);
|
||||
undef $mo111;
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(2, 0, 0, 0, 1, 2);
|
||||
}
|
||||
|
||||
{
|
||||
# null check
|
||||
cpp11_rvalue_reference_move_input::Counter::reset_counts();
|
||||
eval {
|
||||
cpp11_rvalue_reference_move_input::MovableCopyable::movein(undef);
|
||||
};
|
||||
like($@, qr/\binvalid null reference/, "Should have thrown null error");
|
||||
cpp11_rvalue_reference_move_input::Counter::check_counts(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
require "tests.php";
|
||||
|
||||
# Function containing rvalue reference parameter
|
||||
Counter::reset_counts();
|
||||
$mo = new MovableCopyable(222);
|
||||
Counter::check_counts(1, 0, 0, 0, 0, 0);
|
||||
MovableCopyable::movein($mo);
|
||||
Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
try {
|
||||
MovableCopyable::is_nullptr($mo);
|
||||
check::fail("is_nullptr check");
|
||||
} catch (TypeError $e) {
|
||||
}
|
||||
$mo = NULL;
|
||||
Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
|
||||
# Move constructor test
|
||||
Counter::reset_counts();
|
||||
$mo = new MovableCopyable(222);
|
||||
Counter::check_counts(1, 0, 0, 0, 0, 0);
|
||||
$mo_moved = new MovableCopyable($mo);
|
||||
Counter::check_counts(1, 0, 0, 1, 0, 1);
|
||||
try {
|
||||
MovableCopyable::is_nullptr($mo);
|
||||
check::fail("is_nullptr check");
|
||||
} catch (TypeError $e) {
|
||||
}
|
||||
$mo = NULL;
|
||||
Counter::check_counts(1, 0, 0, 1, 0, 1);
|
||||
$mo_moved = NULL;
|
||||
Counter::check_counts(1, 0, 0, 1, 0, 2);
|
||||
|
||||
# Move assignment operator test
|
||||
Counter::reset_counts();
|
||||
$mo111 = new MovableCopyable(111);
|
||||
$mo222 = new MovableCopyable(222);
|
||||
Counter::check_counts(2, 0, 0, 0, 0, 0);
|
||||
$mo111->MoveAssign($mo222);
|
||||
Counter::check_counts(2, 0, 0, 0, 1, 1);
|
||||
try {
|
||||
MovableCopyable::is_nullptr($mo222);
|
||||
check::fail("is_nullptr check");
|
||||
} catch (TypeError $e) {
|
||||
}
|
||||
$mo222 = NULL;
|
||||
Counter::check_counts(2, 0, 0, 0, 1, 1);
|
||||
$mo111 = NULL;
|
||||
Counter::check_counts(2, 0, 0, 0, 1, 2);
|
||||
|
||||
# null check
|
||||
Counter::reset_counts();
|
||||
$exception_thrown = false;
|
||||
try {
|
||||
MovableCopyable::movein(NULL);
|
||||
} catch (TypeError $e) {
|
||||
check::str_contains($e->getMessage(), "Invalid null reference", "incorrect exception message: {$e->getMessage()}");
|
||||
$exception_thrown = true;
|
||||
}
|
||||
check::equal($exception_thrown, true, "Should have thrown null error");
|
||||
Counter::check_counts(0, 0, 0, 0, 0, 0);
|
||||
|
||||
check::done();
|
||||
|
|
@ -40,20 +40,27 @@ try {
|
|||
check::fail("is_nullptr check");
|
||||
} catch (TypeError $e) {
|
||||
}
|
||||
$exception_thrown = false;
|
||||
try {
|
||||
takeKlassUniquePtr($kin);
|
||||
} catch (TypeError $e) {
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of type 'Klass *' of takeKlassUniquePtr", "Unexpected exception: {$e->getMessage()}");
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of SWIGTYPE_p_Klass of takeKlassUniquePtr", "Unexpected exception: {$e->getMessage()}");
|
||||
$exception_thrown = true;
|
||||
}
|
||||
check::equal($exception_thrown, true, "double usage of takeKlassUniquePtr should have been an error");
|
||||
$kin = NULL; # Should not fail, even though already deleted
|
||||
checkCount(0);
|
||||
|
||||
$kin = new Klass("KlassInput");
|
||||
$exception_thrown = false;
|
||||
$notowned = get_not_owned_ptr($kin);
|
||||
try {
|
||||
takeKlassUniquePtr($notowned);
|
||||
} catch (TypeError $e) {
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of type 'Klass *' of takeKlassUniquePtr", "Unexpected exception: {$e->getMessage()}");
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of SWIGTYPE_p_Klass of takeKlassUniquePtr", "Unexpected exception: {$e->getMessage()}");
|
||||
$exception_thrown = true;
|
||||
}
|
||||
check::equal($exception_thrown, true, "double usage of takeKlassUniquePtr should have been an error");
|
||||
checkCount(1);
|
||||
$kin = NULL;
|
||||
checkCount(0);
|
||||
|
|
|
|||
|
|
@ -40,20 +40,27 @@ try {
|
|||
check::fail("is_nullptr check");
|
||||
} catch (TypeError $e) {
|
||||
}
|
||||
$exception_thrown = false;
|
||||
try {
|
||||
takeKlassAutoPtr($kin);
|
||||
} catch (TypeError $e) {
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of type 'Klass *' of takeKlassAutoPtr", "Unexpected exception: {$e->getMessage()}");
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of SWIGTYPE_p_Klass of takeKlassAutoPtr", "Unexpected exception: {$e->getMessage()}");
|
||||
$exception_thrown = true;
|
||||
}
|
||||
check::equal($exception_thrown, true, "double usage of takeKlassAutoPtr should have been an error");
|
||||
$kin = NULL; # Should not fail, even though already deleted
|
||||
checkCount(0);
|
||||
|
||||
$kin = new Klass("KlassInput");
|
||||
$exception_thrown = false;
|
||||
$notowned = get_not_owned_ptr($kin);
|
||||
try {
|
||||
takeKlassAutoPtr($notowned);
|
||||
} catch (TypeError $e) {
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of type 'Klass *' of takeKlassAutoPtr", "Unexpected exception: {$e->getMessage()}");
|
||||
check::equal($e->getMessage(), "Cannot release ownership as memory is not owned for argument 1 of SWIGTYPE_p_Klass of takeKlassAutoPtr", "Unexpected exception: {$e->getMessage()}");
|
||||
$exception_thrown = true;
|
||||
}
|
||||
check::equal($exception_thrown, true, "double usage of takeKlassAutoPtr should have been an error");
|
||||
checkCount(1);
|
||||
$kin = NULL;
|
||||
checkCount(0);
|
||||
|
|
|
|||
|
|
@ -178,6 +178,11 @@ class check {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static function str_contains($a,$b,$message=null) {
|
||||
# Use strpos as PHP function str_contains requires PHP 8
|
||||
return check::equal(strpos($a,$b)!==false,true,$message);
|
||||
}
|
||||
|
||||
static function isnull($a,$message=null) {
|
||||
return check::equal($a,NULL,$message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
from cpp11_rvalue_reference_move_input import *
|
||||
|
||||
# Function containing rvalue reference parameter
|
||||
Counter.reset_counts()
|
||||
mo = MovableCopyable(222)
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
MovableCopyable.movein(mo)
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
if not MovableCopyable.is_nullptr(mo):
|
||||
raise RuntimeError("is_nullptr check")
|
||||
del mo
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
|
||||
# Move constructor test
|
||||
Counter.reset_counts()
|
||||
mo = MovableCopyable(222)
|
||||
Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
mo_moved = MovableCopyable(mo)
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
if not MovableCopyable.is_nullptr(mo):
|
||||
raise RuntimeError("is_nullptr check")
|
||||
del mo
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
del mo_moved
|
||||
Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
|
||||
# Move assignment operator test
|
||||
Counter.reset_counts()
|
||||
mo111 = MovableCopyable(111)
|
||||
mo222 = MovableCopyable(222)
|
||||
Counter.check_counts(2, 0, 0, 0, 0, 0)
|
||||
mo111.MoveAssign(mo222)
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
if not MovableCopyable.is_nullptr(mo222):
|
||||
raise RuntimeError("is_nullptr check")
|
||||
del mo222
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
del mo111
|
||||
Counter.check_counts(2, 0, 0, 0, 1, 2)
|
||||
|
||||
# null check
|
||||
Counter.reset_counts()
|
||||
exception_thrown = False
|
||||
try:
|
||||
MovableCopyable.movein(None)
|
||||
except ValueError as e:
|
||||
if "invalid null reference" not in str(e):
|
||||
raise RuntimeError("incorrect exception message:" + str(e))
|
||||
exception_thrown = True
|
||||
if not exception_thrown:
|
||||
raise RuntimeError("Should have thrown null error")
|
||||
Counter.check_counts(0, 0, 0, 0, 0, 0)
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'swig_assert'
|
||||
|
||||
require 'cpp11_rvalue_reference_move_input'
|
||||
|
||||
# Function containing rvalue reference parameter
|
||||
Cpp11_rvalue_reference_move_input::Counter.reset_counts()
|
||||
mo = Cpp11_rvalue_reference_move_input::MovableCopyable.new(222)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.movein(mo)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
exception_thrown = false
|
||||
begin
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.is_nullptr(mo)
|
||||
rescue ObjectPreviouslyDeleted
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
raise RuntimeError, "is_nullptr failed to throw"
|
||||
end
|
||||
mo = nil
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
|
||||
# Move constructor test
|
||||
Cpp11_rvalue_reference_move_input::Counter.reset_counts()
|
||||
mo = Cpp11_rvalue_reference_move_input::MovableCopyable.new(222)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 0, 0, 0)
|
||||
mo_moved = Cpp11_rvalue_reference_move_input::MovableCopyable.new(mo)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
exception_thrown = false
|
||||
begin
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.is_nullptr(mo)
|
||||
rescue ObjectPreviouslyDeleted
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
raise RuntimeError, "is_nullptr failed to throw"
|
||||
end
|
||||
mo = nil
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 1, 0, 1)
|
||||
# mo_moved = nil
|
||||
# Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 1, 0, 2)
|
||||
# Above not deleting the C++ object(node v12) - can't reliably control GC - use the movein function instead to delete
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.movein(mo_moved)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(1, 0, 0, 2, 0, 3)
|
||||
|
||||
# Move assignment operator test
|
||||
Cpp11_rvalue_reference_move_input::Counter.reset_counts()
|
||||
mo111 = Cpp11_rvalue_reference_move_input::MovableCopyable.new(111)
|
||||
mo222 = Cpp11_rvalue_reference_move_input::MovableCopyable.new(222)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(2, 0, 0, 0, 0, 0)
|
||||
mo111.MoveAssign(mo222)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
exception_thrown = false
|
||||
begin
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.is_nullptr(mo222)
|
||||
rescue ObjectPreviouslyDeleted
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
raise RuntimeError, "is_nullptr failed to throw"
|
||||
end
|
||||
mo222 = nil
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(2, 0, 0, 0, 1, 1)
|
||||
# mo111 = nil
|
||||
# Cpp11_rvalue_reference_move_input::Counter.check_counts(2, 0, 0, 0, 1, 2)
|
||||
# Above not deleting the C++ object(node v12) - can't reliably control GC - use the movein function instead to delete
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.movein(mo111)
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(2, 0, 0, 1, 1, 3)
|
||||
|
||||
# null check
|
||||
Cpp11_rvalue_reference_move_input::Counter.reset_counts()
|
||||
exception_thrown = false
|
||||
begin
|
||||
Cpp11_rvalue_reference_move_input::MovableCopyable.movein(nil)
|
||||
rescue ArgumentError => e
|
||||
if (!e.to_s.include? "invalid null reference")
|
||||
raise RuntimeError, "incorrect exception message: #{e.to_s}"
|
||||
end
|
||||
exception_thrown = true
|
||||
end
|
||||
if (!exception_thrown)
|
||||
raise RuntimeError, "Should have thrown null error"
|
||||
end
|
||||
Cpp11_rvalue_reference_move_input::Counter.check_counts(0, 0, 0, 0, 0, 0)
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
; Function containing rvalue reference parameter
|
||||
(Counter-reset-counts)
|
||||
(define mo (new-MovableCopyable 222))
|
||||
(Counter-check-counts 1 0 0 0 0 0)
|
||||
(MovableCopyable-movein mo)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
(unless (MovableCopyable-is-nullptr mo)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
|
||||
; Move constructor test
|
||||
(Counter-reset-counts)
|
||||
(define mo (new-MovableCopyable 222))
|
||||
(Counter-check-counts 1 0 0 0 0 0)
|
||||
(define mo_moved (new-MovableCopyable mo))
|
||||
(Counter-check-counts 1 0 0 1 0 1)
|
||||
(unless (MovableCopyable-is-nullptr mo)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo)
|
||||
(Counter-check-counts 1 0 0 1 0 1)
|
||||
(delete-MovableCopyable mo_moved)
|
||||
(Counter-check-counts 1 0 0 1 0 2)
|
||||
|
||||
; Move assignment operator test
|
||||
(Counter-reset-counts)
|
||||
(define mo111 (new-MovableCopyable 111))
|
||||
(define mo222 (new-MovableCopyable 222))
|
||||
(Counter-check-counts 2 0 0 0 0 0)
|
||||
(MovableCopyable-MoveAssign mo111 mo222)
|
||||
(Counter-check-counts 2 0 0 0 1 1)
|
||||
(unless (MovableCopyable-is-nullptr mo222)
|
||||
(error "is_nullptr failed"))
|
||||
(delete-MovableCopyable mo222)
|
||||
(Counter-check-counts 2 0 0 0 1 1)
|
||||
(delete-MovableCopyable mo111)
|
||||
(Counter-check-counts 2 0 0 0 1 2)
|
||||
|
||||
; null check
|
||||
(Counter-reset-counts)
|
||||
(expect-throw 'misc-error
|
||||
(MovableCopyable-movein '()))
|
||||
; TODO: check the exception message
|
||||
(Counter-check-counts 0 0 0 0 0 0)
|
||||
|
||||
(exit 0)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
if [ catch { load ./cpp11_rvalue_reference_move_input[info sharedlibextension] cpp11_rvalue_reference_move_input} err_msg ] {
|
||||
puts stderr "Could not load shared object:\n$err_msg"
|
||||
}
|
||||
|
||||
|
||||
# Function containing rvalue reference parameter
|
||||
Counter_reset_counts
|
||||
MovableCopyable mo 222
|
||||
Counter_check_counts 1 0 0 0 0 0
|
||||
MovableCopyable_movein mo
|
||||
Counter_check_counts 1 0 0 1 0 2
|
||||
if {![MovableCopyable_is_nullptr mo]} {
|
||||
error "is_nullptr failed to throw"
|
||||
}
|
||||
mo -delete
|
||||
Counter_check_counts 1 0 0 1 0 2
|
||||
|
||||
# Move constructor test
|
||||
Counter_reset_counts
|
||||
MovableCopyable mo 222
|
||||
Counter_check_counts 1 0 0 0 0 0
|
||||
MovableCopyable mo_moved mo
|
||||
Counter_check_counts 1 0 0 1 0 1
|
||||
if {![MovableCopyable_is_nullptr mo]} {
|
||||
error "is_nullptr failed to throw"
|
||||
}
|
||||
mo -delete
|
||||
Counter_check_counts 1 0 0 1 0 1
|
||||
mo_moved -delete
|
||||
Counter_check_counts 1 0 0 1 0 2
|
||||
|
||||
# Move assignment operator test
|
||||
Counter_reset_counts
|
||||
MovableCopyable mo111 111
|
||||
MovableCopyable mo222 222
|
||||
Counter_check_counts 2 0 0 0 0 0
|
||||
mo111 MoveAssign mo222
|
||||
Counter_check_counts 2 0 0 0 1 1
|
||||
if {![MovableCopyable_is_nullptr mo222]} {
|
||||
error "is_nullptr failed to throw"
|
||||
}
|
||||
mo222 -delete
|
||||
Counter_check_counts 2 0 0 0 1 1
|
||||
mo111 -delete
|
||||
Counter_check_counts 2 0 0 0 1 2
|
||||
|
||||
# null check
|
||||
Counter_reset_counts
|
||||
set exception_thrown 0
|
||||
if [ catch {
|
||||
MovableCopyable_movein "NULL"
|
||||
} e ] {
|
||||
if {[string first "invalid null reference" $e] == -1} {
|
||||
error "incorrect exception message: $e"
|
||||
}
|
||||
set exception_thrown 1
|
||||
}
|
||||
if {!$exception_thrown} {
|
||||
error "Should have thrown null error"
|
||||
}
|
||||
Counter_check_counts 0 0 0 0 0 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue