| 1 | // For unit tests only | 
| 2 | |
| 3 | #ifndef TEST_COMMON_H | 
| 4 | #define TEST_COMMON_H | 
| 5 | |
| 6 | #include "mycpp/gc_obj.h" | 
| 7 | |
| 8 | class Point { | 
| 9 | public: | 
| 10 | Point(int x, int y) : x_(x), y_(y) { | 
| 11 | } | 
| 12 | int size() { | 
| 13 | return x_ + y_; | 
| 14 | } | 
| 15 | |
| 16 | static constexpr ObjHeader obj_header() { | 
| 17 | return ObjHeader::ClassFixed(kZeroMask, sizeof(Point)); | 
| 18 | } | 
| 19 | |
| 20 | int x_; | 
| 21 | int y_; | 
| 22 | }; | 
| 23 | |
| 24 | #endif // TEST_COMMON_H |