Line | Count | Source |
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 | 68 | Point(int x, int y) : x_(x), y_(y) { |
11 | 68 | } |
12 | 2 | int size() { |
13 | 2 | return x_ + y_; |
14 | 2 | } |
15 | ||
16 | 68 | static constexpr ObjHeader obj_header() { |
17 | 68 | return ObjHeader::ClassFixed(kZeroMask, sizeof(Point)); |
18 | 68 | } |
19 | ||
20 | int x_; | |
21 | int y_; | |
22 | }; | |
23 | ||
24 | #endif // TEST_COMMON_H |