Removed default arg test cases as the tests were moved into default_args.i some while back

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6548 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-10-29 21:19:15 +00:00
commit 0baac79dfe
14 changed files with 0 additions and 211 deletions

View file

@ -1,11 +0,0 @@
/* This interface file checks whether the SWIG parses anonymous
arguments with default values. Bug reported by Annalisa Terracina
<annalisa.terracina@datamat.it> on 2001-07-03.
*/
%module anonymous_arg
%inline %{
void foo(int = 7771);
void foo(int x) {}
%}

View file

@ -1,9 +0,0 @@
// [ 548272] Default arguments
%module bool_default
%inline %{
bool foo(bool x = true) {
return !x;
}
%}

View file

@ -66,7 +66,6 @@ CPP_TEST_CASES += \
abstract_virtual \
add_link \
aggregate \
anonymous_arg \
anonymous_bitfield \
argout \
array_member \
@ -77,7 +76,6 @@ CPP_TEST_CASES += \
arrays_global_twodim \
arrays_scope \
bloody_hell \
bool_default \
bools \
casts \
cast_operator \
@ -96,18 +94,12 @@ CPP_TEST_CASES += \
conversion_ns_template \
cplusplus_throw \
cpp_enum \
cpp_enum_scope \
cpp_enum_scope \
cpp_namespace \
cpp_nodefault \
cpp_static \
cpp_typedef \
default_cast \
default_char \
default_constructor \
default_ns \
default_args \
default_ref \
defvalue_constructor \
derived_byvalue \
derived_nested \
@ -127,7 +119,6 @@ CPP_TEST_CASES += \
director_wombat \
dynamic_cast \
enum_plus \
enum_scope \
enum_scope_template \
enum_template \
enum_thorough \
@ -187,7 +178,6 @@ CPP_TEST_CASES += \
pure_virtual \
redefined \
reference_global_vars \
rename_default \
rename_scope \
return_const_value \
return_value_scope \
@ -289,7 +279,6 @@ CPP_TEST_CASES += \
valuewrapper \
valuewrapper_base \
valuewrapper_const \
valuewrapper_default \
valuewrapper_opaque \
varargs \
virtual_destructor \

View file

@ -1,17 +0,0 @@
%module cpp_enum_scope
// This tests to make sure default arguments are handled correctly
// when scoped.
%inline %{
enum flavor { BITTER, SWEET };
class Foo {
public:
enum speed { FAST, SLOW };
// Note: default values should be Foo::FAST and SWEET
void blah(speed s = FAST, flavor f = SWEET) {};
};
%}

View file

@ -1,7 +0,0 @@
%module default_cast
%inline %{
void foo(const char *m = (const char *) NULL) { }
void bar(const char *m = (const char *) "Hello") { }
%}

View file

@ -1,7 +0,0 @@
%module default_char
%inline %{
void test1(char c = 'x') {}
void test2(char c = '\0') {}
%}

View file

@ -1,23 +0,0 @@
%module default_ns
%inline %{
namespace AType
{
enum AType
{
NoType
};
}
void dummy(AType::AType aType = AType::NoType) {}
namespace A {
namespace B {
int CONST_NUM = 10;
}
int function(int i = B::CONST_NUM) { return 0; }
}
%}

View file

@ -1,12 +0,0 @@
%module default_ref
%inline %{
#include <string>
void test1(const int &x = 42) {
}
void test2(const std::string &x = "hello") {
}
%}

View file

@ -1,17 +0,0 @@
%module enum_scope
#ifdef SWIGPHP
// php internal naming conflict
%rename (chops) chop;
#endif
%inline %{
class Tree {
public:
enum types {Oak, Fir, Cedar};
void chop(enum types type) {}
void test(int x = Oak + Fir + Cedar) {}
};
enum Tree::types chop(enum Tree::types type) { return type; }
%}

View file

@ -1,13 +0,0 @@
<?php
// Sample test file
require "tests.php4";
require "anonymous_arg.php";
check::functions(array(foo));
// these two should perform without error
foo();
foo(7);
check::done();
?>

View file

@ -1,20 +0,0 @@
<?php
// Sample test file
require "tests.php4";
require "bool_default.php";
// No new functions
check::functions(array(foo));
// No new classes
check::classes(array());
// now new vars
check::globals(array());
check::equal(false,foo(),"foo()==false");
check::equal(false,foo(1),"foo(1)==false");
check::equal(false,foo(true),"foo(true)==false");
check::equal(true,foo(false),"foo(false)==true");
check::equal(true,foo(0),"foo(0)==true");
check::done();
?>

View file

@ -1,17 +0,0 @@
<?php
// Sample test file
require "tests.php4";
require "enum_scope.php";
check::classes("tree");
check::functions("chops");
check::equal(0,Tree_Oak,"0==Tree_Oak");
check::equal(1,Tree_Fir,"1==Tree_Fir");
check::equal(2,Tree_Cedar,"2==Tree_Cedar");
check::equal(Tree_Oak,chops(Tree_Oak),"Tree_Oak==chops(Tree_Oak)");
check::equal(Tree_Fir,chops(Tree_Fir),"Tree_Fir==chops(Tree_Fir)");
check::equal(Tree_Cedar,chops(Tree_Cedar),"Tree_Cedar==chops(Tree_Cedar)");
check::done();
?>

View file

@ -1,27 +0,0 @@
// Here's a nice little test for renaming, symbol table management, and default arguments
%module rename_default
// Rename a class member
%rename(bar2) Foo::bar;
%inline %{
// Define a class
class Foo {
public:
static int bar;
static int spam;
// Use a renamed member as a default argument. SWIG has to resolve
// bar to Foo::bar and not Foo::spam. SWIG-1.3.11 got this wrong.
void method1(int x = bar) {}
// Use unrenamed member as default
void method2(int x = spam) {}
};
int Foo::bar = 1;
int Foo::spam = 2;
%}

View file

@ -1,20 +0,0 @@
%module valuewrapper_default
%inline %{
enum MyType { Val1, Val2 };
class MyClass1
{
public:
MyClass1(MyType myType) {}
};
class MyClass2
{
public :
void set(MyClass1 cl1 = Val1) {}
// This could have been written : set(MyClass1 cl1 = MyClass1(Val1))
// But it works in C++ since there is a "conversion" constructor in MyClass1.
};
%}