Rename all C++0x to C++11 and cpp0x to cpp11
This commit is contained in:
parent
173c4b3bba
commit
738cc36aab
52 changed files with 307 additions and 307 deletions
|
|
@ -87,7 +87,7 @@ CPP_TEST_BROKEN += \
|
|||
overload_complicated \
|
||||
template_default_pointer \
|
||||
template_expr \
|
||||
$(CPP0X_TEST_BROKEN)
|
||||
$(CPP11_TEST_BROKEN)
|
||||
|
||||
|
||||
# Broken C test cases. (Can be run individually using: make testcase.ctest)
|
||||
|
|
@ -97,7 +97,7 @@ C_TEST_BROKEN += \
|
|||
|
||||
# C++ test cases. (Can be run individually using: make testcase.cpptest)
|
||||
CPP_TEST_CASES += \
|
||||
$(CPP0X_TEST_CASES) \
|
||||
$(CPP11_TEST_CASES) \
|
||||
abstract_access \
|
||||
abstract_inherit \
|
||||
abstract_inherit_ok \
|
||||
|
|
@ -476,41 +476,41 @@ CPP_TEST_CASES += \
|
|||
wallkw \
|
||||
wrapmacro
|
||||
|
||||
# C++0x test cases.
|
||||
CPP0X_TEST_CASES = \
|
||||
cpp0x_alternate_function_syntax \
|
||||
cpp0x_constexpr \
|
||||
cpp0x_decltype \
|
||||
cpp0x_default_delete \
|
||||
cpp0x_delegating_constructors \
|
||||
cpp0x_explicit_conversion_operators \
|
||||
cpp0x_function_objects \
|
||||
cpp0x_initializer_list \
|
||||
cpp0x_initializer_list_extend \
|
||||
cpp0x_lambda_functions \
|
||||
cpp0x_null_pointer_constant \
|
||||
cpp0x_raw_string_literals \
|
||||
cpp0x_rvalue_reference \
|
||||
cpp0x_rvalue_reference2 \
|
||||
cpp0x_rvalue_reference3 \
|
||||
cpp0x_sizeof_object \
|
||||
cpp0x_static_assert \
|
||||
cpp0x_strongly_typed_enumerations \
|
||||
cpp0x_template_double_brackets \
|
||||
cpp0x_template_explicit \
|
||||
cpp0x_template_typedefs \
|
||||
cpp0x_uniform_initialization \
|
||||
cpp0x_unrestricted_unions \
|
||||
cpp0x_userdefined_literals \
|
||||
cpp0x_variadic_templates
|
||||
# C++11 test cases.
|
||||
CPP11_TEST_CASES = \
|
||||
cpp11_alternate_function_syntax \
|
||||
cpp11_constexpr \
|
||||
cpp11_decltype \
|
||||
cpp11_default_delete \
|
||||
cpp11_delegating_constructors \
|
||||
cpp11_explicit_conversion_operators \
|
||||
cpp11_function_objects \
|
||||
cpp11_initializer_list \
|
||||
cpp11_initializer_list_extend \
|
||||
cpp11_lambda_functions \
|
||||
cpp11_null_pointer_constant \
|
||||
cpp11_raw_string_literals \
|
||||
cpp11_rvalue_reference \
|
||||
cpp11_rvalue_reference2 \
|
||||
cpp11_rvalue_reference3 \
|
||||
cpp11_sizeof_object \
|
||||
cpp11_static_assert \
|
||||
cpp11_strongly_typed_enumerations \
|
||||
cpp11_template_double_brackets \
|
||||
cpp11_template_explicit \
|
||||
cpp11_template_typedefs \
|
||||
cpp11_uniform_initialization \
|
||||
cpp11_unrestricted_unions \
|
||||
cpp11_userdefined_literals \
|
||||
cpp11_variadic_templates
|
||||
|
||||
# cpp0x_inheriting_constructors \ # not supported by gcc-4.7
|
||||
# cpp0x_hash_tables \ # not fully implemented yet
|
||||
# cpp0x_result_of \ # SWIG does not support
|
||||
# cpp0x_thread_local \ # needs gcc-4.8
|
||||
# cpp11_inheriting_constructors \ # not supported by gcc-4.7
|
||||
# cpp11_hash_tables \ # not fully implemented yet
|
||||
# cpp11_result_of \ # SWIG does not support
|
||||
# cpp11_thread_local \ # needs gcc-4.8
|
||||
|
||||
# Broken C++0x test cases.
|
||||
CPP0X_TEST_BROKEN =
|
||||
# Broken C++11 test cases.
|
||||
CPP11_TEST_BROKEN =
|
||||
|
||||
#
|
||||
# Put all the heavy STD/STL cases here, where they can be skipped if needed
|
||||
|
|
@ -626,7 +626,7 @@ all: $(NOT_BROKEN_TEST_CASES) $(BROKEN_TEST_CASES)
|
|||
|
||||
check: $(NOT_BROKEN_TEST_CASES)
|
||||
|
||||
check-cpp11: $(CPP0X_TEST_CASES:=.cpptest)
|
||||
check-cpp11: $(CPP11_TEST_CASES:=.cpptest)
|
||||
|
||||
# partialcheck target runs SWIG only, ie no compilation or running of tests (for a subset of languages)
|
||||
partialcheck:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly uses the new alternate functions
|
||||
declarations and definitions introduced in C++0x. */
|
||||
%module cpp0x_alternate_function_syntax
|
||||
declarations and definitions introduced in C++11. */
|
||||
%module cpp11_alternate_function_syntax
|
||||
|
||||
%inline %{
|
||||
struct SomeStruct {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This interface tests whether SWIG supports the new "constexpr" keyword
|
||||
introduced by C++0x.
|
||||
introduced by C++11.
|
||||
*/
|
||||
%module cpp0x_constexpr
|
||||
%module cpp11_constexpr
|
||||
|
||||
%inline %{
|
||||
class TestClass {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This testcase checks whether SWIG correctly uses the new 'decltype()'
|
||||
introduced in C++0x.
|
||||
introduced in C++11.
|
||||
*/
|
||||
%module cpp0x_decltype
|
||||
%module cpp11_decltype
|
||||
|
||||
%inline %{
|
||||
class A {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly parses the default and delete
|
||||
keywords which keep or remove default C++ object construction functions. */
|
||||
%module cpp0x_default_delete
|
||||
%module cpp11_default_delete
|
||||
|
||||
%{
|
||||
#include <stdlib.h>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This test checks whether SWIG correctly parses the new delegating
|
||||
constructors.
|
||||
*/
|
||||
%module cpp0x_delegating_constructors
|
||||
%module cpp11_delegating_constructors
|
||||
|
||||
%inline %{
|
||||
class A {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This interface checks whether SWIG correctly compiles the new
|
||||
explicit conversion operators feature introduced in C++0x.
|
||||
explicit conversion operators feature introduced in C++11.
|
||||
*/
|
||||
%module cpp0x_explicit_conversion_operators
|
||||
%module cpp11_explicit_conversion_operators
|
||||
|
||||
%inline %{
|
||||
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
Function objects are objects which overload the operator() function.
|
||||
The std::function does not provide any seamless support in the target languages yet.
|
||||
*/
|
||||
%module cpp0x_function_objects
|
||||
%module cpp11_function_objects
|
||||
|
||||
%rename(__call__) Test::operator();
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks the new wrappers for the new unordered_ STL types
|
||||
introduced in C++0x. */
|
||||
%module cpp0x_hash_tables
|
||||
introduced in C++11. */
|
||||
%module cpp11_hash_tables
|
||||
|
||||
%inline %{
|
||||
#include <set>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This test checks whether SWIG correctly parses the new constructor
|
||||
inheritance.
|
||||
*/
|
||||
%module cpp0x_inheriting_constructors
|
||||
%module cpp11_inheriting_constructors
|
||||
|
||||
%inline %{
|
||||
class BaseClass {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase shows a few simple ways to deal with the new initializer_list
|
||||
introduced in C++0x. */
|
||||
%module cpp0x_initializer_list
|
||||
introduced in C++11. */
|
||||
%module cpp11_initializer_list
|
||||
|
||||
%warnfilter(SWIGWARN_TYPEMAP_INITIALIZER_LIST) B::B;
|
||||
%ignore A::A(std::initializer_list<int>);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase shows how to replace std_initializer_list with std_vector. */
|
||||
|
||||
%module cpp0x_initializer_list_extend
|
||||
%module cpp11_initializer_list_extend
|
||||
|
||||
%ignore Container::Container(std::initializer_list<int>);
|
||||
%include <std_vector.i>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
/* This testcase checks whether SWIG correctly parses the lambda expressions
|
||||
and closure syntax introduced in C++0x.
|
||||
and closure syntax introduced in C++11.
|
||||
SWIG supports only lambda syntax and doesn't produce any wrapper code for
|
||||
this.
|
||||
*/
|
||||
%module cpp0x_lambda_functions
|
||||
%module cpp11_lambda_functions
|
||||
|
||||
%warnfilter(SWIGWARN_CPP11_LAMBDA) lambda1;
|
||||
%warnfilter(SWIGWARN_CPP11_LAMBDA) lambda2;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/* This testcase checks whether SWIG correctly treats the new nullptr_t
|
||||
constant introduced in C++0x.
|
||||
constant introduced in C++11.
|
||||
*/
|
||||
|
||||
%module cpp0x_null_pointer_constant
|
||||
%module cpp11_null_pointer_constant
|
||||
|
||||
%feature("autodoc") A::NullPtrMethod; // Triggers conversion of nullptr to None, nil etc in target language
|
||||
%feature("compactdefaultargs") A::NullPtrMethod;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
This module also tests whether SWIG correctly parses custom string delimiters.
|
||||
*/
|
||||
%module cpp0x_raw_string_literals
|
||||
%module cpp11_raw_string_literals
|
||||
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) bb;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) ee;
|
||||
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) gg;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly uses the new result_of class
|
||||
and its templating capabilities introduced in C++0x. */
|
||||
%module cpp0x_result_of
|
||||
and its templating capabilities introduced in C++11. */
|
||||
%module cpp11_result_of
|
||||
|
||||
%inline %{
|
||||
#include <functional>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly parses the double ampersand &&
|
||||
move operator which is currently mapped to the reference & operator. */
|
||||
%module cpp0x_rvalue_reference
|
||||
%module cpp11_rvalue_reference
|
||||
|
||||
%inline %{
|
||||
#include <utility>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
%module cpp0x_rvalue_reference2
|
||||
%module cpp11_rvalue_reference2
|
||||
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK) globalrrval;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
%module cpp0x_rvalue_reference3
|
||||
%module cpp11_rvalue_reference3
|
||||
|
||||
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK);
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly uses the sizeof() on the
|
||||
concrete objects and not only types introduced in C++0x. */
|
||||
%module cpp0x_sizeof_object
|
||||
concrete objects and not only types introduced in C++11. */
|
||||
%module cpp11_sizeof_object
|
||||
|
||||
%inline %{
|
||||
struct B {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This test case checks whether SWIG correctly parses and ignores the
|
||||
keywords "static_assert()" inside the class or struct.
|
||||
*/
|
||||
%module cpp0x_static_assert
|
||||
%module cpp11_static_assert
|
||||
|
||||
%inline %{
|
||||
template <typename T>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* This testcase checks whether SWIG produces the correct wrapper for the
|
||||
strongly typed enums. Enums with the same type are comparable. Enum classes
|
||||
require support for nested classes. */
|
||||
%module cpp0x_strongly_typed_enumerations
|
||||
%module cpp11_strongly_typed_enumerations
|
||||
%warnfilter(302) Val1;
|
||||
%warnfilter(302) Val2;
|
||||
%warnfilter(302) Val3;
|
||||
|
|
@ -30,13 +30,13 @@ enum class Enum2 : short {
|
|||
%}
|
||||
|
||||
// SWIG should fail this one
|
||||
enum Enum2 : unsigned short; // Illegal in C++0x, because Enum2 was previously declared with a different type.
|
||||
enum Enum2 : unsigned short; // Illegal in C++11, because Enum2 was previously declared with a different type.
|
||||
|
||||
%inline %{
|
||||
/* Forward declarations. */
|
||||
enum Enum4 : unsigned int; // Legal in C++0x.
|
||||
enum class Enum5; // Legal in C++0x, because enum class declarations have a default type of "int".
|
||||
enum class Enum6 : unsigned int; // Legal C++0x.
|
||||
enum Enum4 : unsigned int; // Legal in C++11.
|
||||
enum class Enum5; // Legal in C++11, because enum class declarations have a default type of "int".
|
||||
enum class Enum6 : unsigned int; // Legal C++11.
|
||||
|
||||
enum Enum4 : unsigned int {
|
||||
Val1, Val2, Val3 = 100, Val4
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/* This interface checks whether SWIG supports the new double angled brackets
|
||||
in the template syntax without having a space inbetween. This feature was
|
||||
introduced in new C++0x standard.
|
||||
introduced in new C++11 standard.
|
||||
*/
|
||||
%module cpp0x_template_double_brackets
|
||||
%module cpp11_template_double_brackets
|
||||
%inline %{
|
||||
#include <map>
|
||||
std::map<int,std::map<int, double>> map1;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
/* This unit tests whether SWIG correctly parses the code and makes wrappers
|
||||
for the new C++0x extern templates (explicit template instantiation without
|
||||
for the new C++11 extern templates (explicit template instantiation without
|
||||
using the translation unit).
|
||||
*/
|
||||
%module cpp0x_template_explicit
|
||||
%module cpp11_template_explicit
|
||||
|
||||
#pragma SWIG nowarn=SWIGWARN_PARSE_EXPLICIT_TEMPLATE
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/* This testcase checks whether SWIG correctly parses alias templates. */
|
||||
%module cpp0x_template_typedefs
|
||||
%module cpp11_template_typedefs
|
||||
|
||||
%warnfilter(SWIGWARN_CPP11_ALIAS_TEMPLATE) TypedefName;
|
||||
%warnfilter(SWIGWARN_CPP11_ALIAS_DECLARATION) PF;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly parses the 'thread_local' storage specifier */
|
||||
|
||||
%module cpp0x_thread_local
|
||||
%module cpp11_thread_local
|
||||
|
||||
%inline %{
|
||||
struct ThreadLocals {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG syntactically correctly parses the initialization syntax using
|
||||
{} braces for uniform member initialization. */
|
||||
%module cpp0x_uniform_initialization
|
||||
%module cpp11_uniform_initialization
|
||||
|
||||
%include <std_vector.i>
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly parses the support for types
|
||||
without the defined trivial constructor in the unions. */
|
||||
%module cpp0x_unrestricted_unions
|
||||
%module cpp11_unrestricted_unions
|
||||
|
||||
%inline %{
|
||||
struct point {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* This testcase checks whether SWIG correctly parses the user-defined literals
|
||||
introduced in C++0x. */
|
||||
%module cpp0x_userdefined_literals
|
||||
introduced in C++11. */
|
||||
%module cpp11_userdefined_literals
|
||||
|
||||
// Unfortunately full declaration is needed for %rename atm, the parameter list cannot be omitted.
|
||||
%rename(MyRawLiteral) operator"" _myRawLiteral(const char * value);
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
the template brackets, new functions sizeof... and multiple inheritance
|
||||
using variadic number of classes.
|
||||
*/
|
||||
%module cpp0x_variadic_templates
|
||||
%module cpp11_variadic_templates
|
||||
%warnfilter(SWIGWARN_CPP11_VARIADIC_TEMPLATE) MultiArgs;
|
||||
%warnfilter(SWIGWARN_CPP11_VARIADIC_TEMPLATE) SizeOf;
|
||||
%warnfilter(SWIGWARN_CPP11_VARIADIC_TEMPLATE) MultiInherit;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import cpp0x_lambda_functions.*;
|
||||
import cpp11_lambda_functions.*;
|
||||
|
||||
public class cpp0x_lambda_functions_runme {
|
||||
public class cpp11_lambda_functions_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("cpp0x_lambda_functions");
|
||||
System.loadLibrary("cpp11_lambda_functions");
|
||||
} 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.exit(1);
|
||||
|
|
@ -18,11 +18,11 @@ public class cpp0x_lambda_functions_runme {
|
|||
|
||||
public static void main(String argv[])
|
||||
{
|
||||
check(cpp0x_lambda_functions.runLambda1(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda2(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda3(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda4(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda5(), 1);
|
||||
check(cpp0x_lambda_functions.runLambda5(), 2);
|
||||
check(cpp11_lambda_functions.runLambda1(), 11);
|
||||
check(cpp11_lambda_functions.runLambda2(), 11);
|
||||
check(cpp11_lambda_functions.runLambda3(), 11);
|
||||
check(cpp11_lambda_functions.runLambda4(), 11);
|
||||
check(cpp11_lambda_functions.runLambda5(), 1);
|
||||
check(cpp11_lambda_functions.runLambda5(), 2);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import cpp0x_thread_local.*;
|
||||
import cpp11_thread_local.*;
|
||||
|
||||
public class cpp0x_thread_local_runme {
|
||||
public class cpp11_thread_local_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("cpp0x_thread_local");
|
||||
System.loadLibrary("cpp11_thread_local");
|
||||
} 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.exit(1);
|
||||
|
|
@ -20,32 +20,32 @@ public class cpp0x_thread_local_runme {
|
|||
if (ThreadLocals.tscval99 != 99)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setEtval(-11);
|
||||
if (cpp0x_thread_local.getEtval() != -11)
|
||||
cpp11_thread_local.setEtval(-11);
|
||||
if (cpp11_thread_local.getEtval() != -11)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setStval(-22);
|
||||
if (cpp0x_thread_local.getStval() != -22)
|
||||
cpp11_thread_local.setStval(-22);
|
||||
if (cpp11_thread_local.getStval() != -22)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setTsval(-33);
|
||||
if (cpp0x_thread_local.getTsval() != -33)
|
||||
cpp11_thread_local.setTsval(-33);
|
||||
if (cpp11_thread_local.getTsval() != -33)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setEtval(-44);
|
||||
if (cpp0x_thread_local.getEtval() != -44)
|
||||
cpp11_thread_local.setEtval(-44);
|
||||
if (cpp11_thread_local.getEtval() != -44)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setTeval(-55);
|
||||
if (cpp0x_thread_local.getTeval() != -55)
|
||||
cpp11_thread_local.setTeval(-55);
|
||||
if (cpp11_thread_local.getTeval() != -55)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setEctval(-55);
|
||||
if (cpp0x_thread_local.getEctval() != -55)
|
||||
cpp11_thread_local.setEctval(-55);
|
||||
if (cpp11_thread_local.getEctval() != -55)
|
||||
throw new RuntimeException();
|
||||
|
||||
cpp0x_thread_local.setEcpptval(-66);
|
||||
if (cpp0x_thread_local.getEcpptval() != -66)
|
||||
cpp11_thread_local.setEcpptval(-66);
|
||||
if (cpp11_thread_local.getEcpptval() != -66)
|
||||
throw new RuntimeException();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import cpp0x_function_objects
|
||||
import sys
|
||||
|
||||
t = cpp0x_function_objects.Test()
|
||||
if t.value != 0:
|
||||
raise RuntimeError("Runtime cpp0x_function_objects failed. t.value should be 0, but is " + str(t.value))
|
||||
|
||||
t(1,2) # adds numbers and sets value
|
||||
|
||||
if t.value != 3:
|
||||
raise RuntimeError("Runtime cpp0x_function_objects failed. t.value not changed - should be 3, but is " + str(t.value))
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
import cpp0x_initializer_list_extend
|
||||
|
||||
c = cpp0x_initializer_list_extend.Container( [10, 20, 30, 40] )
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import cpp0x_initializer_list
|
||||
|
||||
a = cpp0x_initializer_list.A()
|
||||
a = cpp0x_initializer_list.A(11.1)
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
import cpp0x_null_pointer_constant
|
||||
|
||||
a = cpp0x_null_pointer_constant.A()
|
||||
|
||||
if a._myA != None:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: _myA should be None, but is ", a._myA)
|
||||
|
||||
b = cpp0x_null_pointer_constant.A()
|
||||
if a._myA != b._myA:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: a._myA should be the same as b._myA, but ", a._myA, "!=", b._myA)
|
||||
|
||||
a._myA = cpp0x_null_pointer_constant.A()
|
||||
if a._myA == None:
|
||||
raise RuntimeError, ("cpp0x_null_pointer_constant: _myA should be object, but is None")
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import cpp0x_result_of
|
||||
if cpp0x_result_of.test_result(cpp0x_result_of.square, 3.0) != 9.0:
|
||||
raise RuntimeError, "test_result(square, 3.0) is not 9.0."
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_alternate_function_syntax
|
||||
import cpp11_alternate_function_syntax
|
||||
|
||||
a = cpp0x_alternate_function_syntax.SomeStruct()
|
||||
a = cpp11_alternate_function_syntax.SomeStruct()
|
||||
|
||||
res = a.addNormal(4,5)
|
||||
if res != 9:
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_decltype
|
||||
import cpp11_decltype
|
||||
|
||||
a = cpp0x_decltype.A()
|
||||
a = cpp11_decltype.A()
|
||||
a.i = 5
|
||||
if a.i != 5:
|
||||
raise RuntimeError, "Assignment to a.i failed."
|
||||
12
Examples/test-suite/python/cpp11_function_objects_runme.py
Normal file
12
Examples/test-suite/python/cpp11_function_objects_runme.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import cpp11_function_objects
|
||||
import sys
|
||||
|
||||
t = cpp11_function_objects.Test()
|
||||
if t.value != 0:
|
||||
raise RuntimeError("Runtime cpp11_function_objects failed. t.value should be 0, but is " + str(t.value))
|
||||
|
||||
t(1,2) # adds numbers and sets value
|
||||
|
||||
if t.value != 3:
|
||||
raise RuntimeError("Runtime cpp11_function_objects failed. t.value not changed - should be 3, but is " + str(t.value))
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
import cpp11_initializer_list_extend
|
||||
|
||||
c = cpp11_initializer_list_extend.Container( [10, 20, 30, 40] )
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import cpp11_initializer_list
|
||||
|
||||
a = cpp11_initializer_list.A()
|
||||
a = cpp11_initializer_list.A(11.1)
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import cpp11_null_pointer_constant
|
||||
|
||||
a = cpp11_null_pointer_constant.A()
|
||||
|
||||
if a._myA != None:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: _myA should be None, but is ", a._myA)
|
||||
|
||||
b = cpp11_null_pointer_constant.A()
|
||||
if a._myA != b._myA:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: a._myA should be the same as b._myA, but ", a._myA, "!=", b._myA)
|
||||
|
||||
a._myA = cpp11_null_pointer_constant.A()
|
||||
if a._myA == None:
|
||||
raise RuntimeError, ("cpp11_null_pointer_constant: _myA should be object, but is None")
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from cpp0x_raw_string_literals import *
|
||||
from cpp11_raw_string_literals import *
|
||||
|
||||
if cvar.L != 100:
|
||||
raise RuntimeError
|
||||
3
Examples/test-suite/python/cpp11_result_of_runme.py
Normal file
3
Examples/test-suite/python/cpp11_result_of_runme.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import cpp11_result_of
|
||||
if cpp11_result_of.test_result(cpp11_result_of.square, 3.0) != 9.0:
|
||||
raise RuntimeError, "test_result(square, 3.0) is not 9.0."
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import cpp0x_rvalue_reference
|
||||
import cpp11_rvalue_reference
|
||||
|
||||
a = cpp0x_rvalue_reference.A()
|
||||
a = cpp11_rvalue_reference.A()
|
||||
|
||||
a.setAcopy(5)
|
||||
if a.getAcopy() != 5:
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from cpp0x_thread_local import *
|
||||
from cpp11_thread_local import *
|
||||
|
||||
t = ThreadLocals()
|
||||
if t.stval != 11:
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
import cpp0x_uniform_initialization
|
||||
import cpp11_uniform_initialization
|
||||
|
||||
var1 = cpp0x_uniform_initialization.cvar.var1
|
||||
var1 = cpp11_uniform_initialization.cvar.var1
|
||||
if var1.x != 5:
|
||||
raise RuntimeError
|
||||
var2 = cpp0x_uniform_initialization.cvar.var2
|
||||
var2 = cpp11_uniform_initialization.cvar.var2
|
||||
if var2.getX() != 2:
|
||||
raise RuntimeError
|
||||
|
||||
m = cpp0x_uniform_initialization.MoreInit()
|
||||
m = cpp11_uniform_initialization.MoreInit()
|
||||
if m.charptr != None:
|
||||
raise RuntimeError, m.charptr
|
||||
m.charptr = "hello sir"
|
||||
Loading…
Add table
Add a link
Reference in a new issue