diff --git a/.gitea/workflows/ubuntu.yaml b/.gitea/workflows/ubuntu.yaml new file mode 100644 index 0000000..69207e4 --- /dev/null +++ b/.gitea/workflows/ubuntu.yaml @@ -0,0 +1,19 @@ +name: ubuntu +run-name: ubuntu-test +on: [ push ] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + apt install libmruby-dev + mkdir build && cd build + cmake .. + cmake --build . --target mrubypp_test + ./mrubypp_test + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/test/test_class.cpp b/test/test_class.cpp index ca150d7..c97b790 100644 --- a/test/test_class.cpp +++ b/test/test_class.cpp @@ -16,16 +16,10 @@ public: } int get_x() const { return x_; } - void set_x(int x) { - // - x_ = x; - } + void set_x(int x) { x_ = x; } int get_y() const { return y_; } - void set_y(int y) { - // - y_ = y; - } + void set_y(int y) { y_ = y; } void add(const Point &other) { this->x_ += other.x_; @@ -113,6 +107,7 @@ TEST_CASE("Point", "[class]") { REQUIRE(point_result.get_x() == 2); REQUIRE(point_result.get_y() == 4); } + SECTION("test_class_method") { auto result = engine.call("test_class_method"); REQUIRE(result == 1);