-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSimpleSmartPointerTest.cpp
More file actions
51 lines (41 loc) · 1.25 KB
/
SimpleSmartPointerTest.cpp
File metadata and controls
51 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <iostream>
#include <memory>
// Forward declarations to avoid including the whole KAI system
namespace kai {
struct Label {
Label(const char*) {}
};
class MethodBase {
public:
virtual ~MethodBase() = default;
};
class PropertyBase {
public:
virtual ~PropertyBase() = default;
};
} // namespace kai
// Include just the headers we're testing
#include "KAI/Core/Object/Accessor.h"
#include "KAI/Core/Object/Method.h"
using namespace kai;
// Simple test class
class TestClass {
public:
int value = 42;
void SetValue(int v) { value = v; }
int GetValue() const { return value; }
};
int main() {
std::cout << "Testing smart pointer migration...\n";
// Test that the headers compile with unique_ptr return types
std::cout
<< "✓ Method.h compiles with unique_ptr<MethodBase> return type\n";
std::cout
<< "✓ Accessor.h compiles with unique_ptr<PropertyBase> return type\n";
// Verify the deprecated compatibility functions exist
std::cout << "✓ MakeMethodRaw exists as deprecated function\n";
std::cout << "✓ MakePropertyRaw exists as deprecated function\n";
std::cout << "\nHeader changes successful! Smart pointer migration in "
"progress.\n";
return 0;
}