rename std::array testcase
This commit is contained in:
parent
6d0c495fd0
commit
1f44997343
6 changed files with 26 additions and 26 deletions
|
|
@ -575,7 +575,7 @@ CPP11_TEST_CASES += \
|
||||||
cpp11_initializer_list \
|
cpp11_initializer_list \
|
||||||
cpp11_initializer_list_extend \
|
cpp11_initializer_list_extend \
|
||||||
cpp11_lambda_functions \
|
cpp11_lambda_functions \
|
||||||
cpp11_li_std_array \
|
cpp11_std_array \
|
||||||
cpp11_noexcept \
|
cpp11_noexcept \
|
||||||
cpp11_null_pointer_constant \
|
cpp11_null_pointer_constant \
|
||||||
cpp11_raw_string_literals \
|
cpp11_raw_string_literals \
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%module cpp11_li_std_array
|
%module cpp11_std_array
|
||||||
|
|
||||||
#if defined(SWIGPYTHON) || defined(SWIGRUBY) || defined(SWIGJAVA) || defined(SWIGCSHARP)
|
#if defined(SWIGPYTHON) || defined(SWIGRUBY) || defined(SWIGJAVA) || defined(SWIGCSHARP)
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// This test tests all the methods in the C# collection wrapper
|
// This test tests all the methods in the C# collection wrapper
|
||||||
using System;
|
using System;
|
||||||
using cpp11_li_std_arrayNamespace;
|
using cpp11_std_arrayNamespace;
|
||||||
|
|
||||||
public class cpp11_li_std_array_runme
|
public class cpp11_std_array_runme
|
||||||
{
|
{
|
||||||
private static ArrayInt6 ToArray6(int[] a)
|
private static ArrayInt6 ToArray6(int[] a)
|
||||||
{
|
{
|
||||||
|
|
@ -37,24 +37,24 @@ public class cpp11_li_std_array_runme
|
||||||
compareContainers(ai, vals);
|
compareContainers(ai, vals);
|
||||||
|
|
||||||
// Check return
|
// Check return
|
||||||
compareContainers(cpp11_li_std_array.arrayOutVal(), new int[] { -2, -1, 0, 0, 1, 2 });
|
compareContainers(cpp11_std_array.arrayOutVal(), new int[] { -2, -1, 0, 0, 1, 2 });
|
||||||
compareContainers(cpp11_li_std_array.arrayOutConstRef(), new int[] { -2, -1, 0, 0, 1, 2 });
|
compareContainers(cpp11_std_array.arrayOutConstRef(), new int[] { -2, -1, 0, 0, 1, 2 });
|
||||||
compareContainers(cpp11_li_std_array.arrayOutRef(), new int[] { -2, -1, 0, 0, 1, 2 });
|
compareContainers(cpp11_std_array.arrayOutRef(), new int[] { -2, -1, 0, 0, 1, 2 });
|
||||||
compareContainers(cpp11_li_std_array.arrayOutPtr(), new int[] { -2, -1, 0, 0, 1, 2 });
|
compareContainers(cpp11_std_array.arrayOutPtr(), new int[] { -2, -1, 0, 0, 1, 2 });
|
||||||
|
|
||||||
// Check passing arguments
|
// Check passing arguments
|
||||||
ai = cpp11_li_std_array.arrayInVal(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
ai = cpp11_std_array.arrayInVal(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
||||||
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
||||||
|
|
||||||
ai = cpp11_li_std_array.arrayInConstRef(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
ai = cpp11_std_array.arrayInConstRef(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
||||||
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
||||||
|
|
||||||
ai = new ArrayInt6(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
ai = new ArrayInt6(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
||||||
cpp11_li_std_array.arrayInRef(ai);
|
cpp11_std_array.arrayInRef(ai);
|
||||||
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
||||||
|
|
||||||
ai = new ArrayInt6(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
ai = new ArrayInt6(ToArray6(new int[] { 9, 8, 7, 6, 5, 4 }));
|
||||||
cpp11_li_std_array.arrayInPtr(ai);
|
cpp11_std_array.arrayInPtr(ai);
|
||||||
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
compareContainers(ai, new int[] { 90, 80, 70, 60, 50, 40 });
|
||||||
|
|
||||||
// fill
|
// fill
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import cpp11_li_std_array.*;
|
import cpp11_std_array.*;
|
||||||
|
|
||||||
public class cpp11_li_std_array_runme {
|
public class cpp11_std_array_runme {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
System.loadLibrary("cpp11_li_std_array");
|
System.loadLibrary("cpp11_std_array");
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
|
|
@ -43,24 +43,24 @@ public class cpp11_li_std_array_runme {
|
||||||
compareContainers(ai, vals);
|
compareContainers(ai, vals);
|
||||||
|
|
||||||
// Check return
|
// Check return
|
||||||
compareContainers(cpp11_li_std_array.arrayOutVal(), new int[] {-2, -1, 0, 0, 1, 2});
|
compareContainers(cpp11_std_array.arrayOutVal(), new int[] {-2, -1, 0, 0, 1, 2});
|
||||||
compareContainers(cpp11_li_std_array.arrayOutConstRef(), new int[] {-2, -1, 0, 0, 1, 2});
|
compareContainers(cpp11_std_array.arrayOutConstRef(), new int[] {-2, -1, 0, 0, 1, 2});
|
||||||
compareContainers(cpp11_li_std_array.arrayOutRef(), new int[] {-2, -1, 0, 0, 1, 2});
|
compareContainers(cpp11_std_array.arrayOutRef(), new int[] {-2, -1, 0, 0, 1, 2});
|
||||||
compareContainers(cpp11_li_std_array.arrayOutPtr(), new int[] {-2, -1, 0, 0, 1, 2});
|
compareContainers(cpp11_std_array.arrayOutPtr(), new int[] {-2, -1, 0, 0, 1, 2});
|
||||||
|
|
||||||
// Check passing arguments
|
// Check passing arguments
|
||||||
ai = cpp11_li_std_array.arrayInVal(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
ai = cpp11_std_array.arrayInVal(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
||||||
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
||||||
|
|
||||||
ai = cpp11_li_std_array.arrayInConstRef(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
ai = cpp11_std_array.arrayInConstRef(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
||||||
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
||||||
|
|
||||||
ai = new ArrayInt6(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
ai = new ArrayInt6(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
||||||
cpp11_li_std_array.arrayInRef(ai);
|
cpp11_std_array.arrayInRef(ai);
|
||||||
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
||||||
|
|
||||||
ai = new ArrayInt6(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
ai = new ArrayInt6(ToArray6(new int[] {9, 8, 7, 6, 5, 4}));
|
||||||
cpp11_li_std_array.arrayInPtr(ai);
|
cpp11_std_array.arrayInPtr(ai);
|
||||||
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
compareContainers(ai, new int[] {90, 80, 70, 60, 50, 40});
|
||||||
|
|
||||||
// fill
|
// fill
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from cpp11_li_std_array import *
|
from cpp11_std_array import *
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
require 'swig_assert'
|
require 'swig_assert'
|
||||||
|
|
||||||
require 'cpp11_li_std_array'
|
require 'cpp11_std_array'
|
||||||
|
|
||||||
include Cpp11_li_std_array
|
include Cpp11_std_array
|
||||||
|
|
||||||
|
|
||||||
def failed(a, b, msg)
|
def failed(a, b, msg)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue