From fcd7260f6db40da464a71cc192e856d3f2a2c2d5 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sun, 5 Jul 2015 01:08:04 +0300 Subject: [PATCH] Filled in he missing C++ impls of methods with default args. Signed-off-by: Dimitar Dobrev --- tests/CSharpTemp/CSharpTemp.Tests.cs | 25 ++++++++++++++++++++----- tests/CSharpTemp/CSharpTemp.cpp | 20 ++++++++++++++++++++ tests/CSharpTemp/CSharpTemp.h | 2 +- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index 3e09c37e..2f7eb831 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -128,16 +128,31 @@ public class CSharpTempTests : GeneratorTestFixture public void TestDefaultArguments() { var methodsWithDefaultValues = new MethodsWithDefaultValues(); - methodsWithDefaultValues.DefaultChar(); - methodsWithDefaultValues.DefaultEmptyChar(); methodsWithDefaultValues.DefaultPointer(); methodsWithDefaultValues.DefaultVoidStar(); methodsWithDefaultValues.DefaultValueType(); - methodsWithDefaultValues.DefaultRefTypeAfterOthers(); - methodsWithDefaultValues.DefaultRefTypeBeforeAndAfterOthers(5, new Foo()); + methodsWithDefaultValues.DefaultChar(); + methodsWithDefaultValues.DefaultEmptyChar(); methodsWithDefaultValues.DefaultRefTypeBeforeOthers(); - methodsWithDefaultValues.DefaultValueType(); + methodsWithDefaultValues.DefaultRefTypeAfterOthers(); + methodsWithDefaultValues.DefaultRefTypeBeforeAndAfterOthers(0, null); methodsWithDefaultValues.DefaultIntAssignedAnEnum(); + methodsWithDefaultValues.defaultRefAssignedValue(); + methodsWithDefaultValues.DefaultRefAssignedValue(); + methodsWithDefaultValues.DefaultEnumAssignedBitwiseOr(); + methodsWithDefaultValues.DefaultEnumAssignedBitwiseOrShort(); + methodsWithDefaultValues.DefaultNonEmptyCtor(); + methodsWithDefaultValues.DefaultMappedToEnum(); + methodsWithDefaultValues.DefaultMappedToZeroEnum(); + methodsWithDefaultValues.DefaultImplicitCtorInt(); + methodsWithDefaultValues.DefaultImplicitCtorChar(); + methodsWithDefaultValues.DefaultImplicitCtorFoo(); + methodsWithDefaultValues.DefaultIntWithLongExpression(); + methodsWithDefaultValues.DefaultRefTypeEnumImplicitCtor(); + methodsWithDefaultValues.Rotate4x4Matrix(0, 0, 0); + methodsWithDefaultValues.DefaultPointerToValueType(); + methodsWithDefaultValues.DefaultDoubleWithoutF(); + methodsWithDefaultValues.DefaultIntExpressionWithEnum(); } [Test] diff --git a/tests/CSharpTemp/CSharpTemp.cpp b/tests/CSharpTemp/CSharpTemp.cpp index 925882ab..08b7b87f 100644 --- a/tests/CSharpTemp/CSharpTemp.cpp +++ b/tests/CSharpTemp/CSharpTemp.cpp @@ -343,6 +343,22 @@ void MethodsWithDefaultValues::defaultRefAssignedValue(const Foo &fooRef) { } +void MethodsWithDefaultValues::DefaultRefAssignedValue(const Foo &fooRef) +{ +} + +void MethodsWithDefaultValues::defaultEnumAssignedBitwiseOr(Flags flags) +{ +} + +void MethodsWithDefaultValues::defaultEnumAssignedBitwiseOrShort(UntypedFlags flags) +{ +} + +void MethodsWithDefaultValues::defaultNonEmptyCtor(QGenericArgument arg) +{ +} + void MethodsWithDefaultValues::defaultMappedToEnum(QFlags qFlags) { } @@ -359,6 +375,10 @@ void MethodsWithDefaultValues::defaultImplicitCtorChar(Quux arg) { } +void MethodsWithDefaultValues::defaultImplicitCtorFoo(Quux arg) +{ +} + void MethodsWithDefaultValues::defaultIntWithLongExpression(unsigned int i) { } diff --git a/tests/CSharpTemp/CSharpTemp.h b/tests/CSharpTemp/CSharpTemp.h index 21016a8b..a9f0072f 100644 --- a/tests/CSharpTemp/CSharpTemp.h +++ b/tests/CSharpTemp/CSharpTemp.h @@ -250,7 +250,7 @@ namespace Qt }; } -class QColor +class DLL_API QColor { public: QColor();