This commit is contained in:
19
.gitea/workflows/ubuntu.yaml
Normal file
19
.gitea/workflows/ubuntu.yaml
Normal file
@@ -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 }}."
|
||||||
@@ -16,16 +16,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int get_x() const { return x_; }
|
int get_x() const { return x_; }
|
||||||
void set_x(int x) {
|
void set_x(int x) { x_ = x; }
|
||||||
//
|
|
||||||
x_ = x;
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_y() const { return y_; }
|
int get_y() const { return y_; }
|
||||||
void set_y(int y) {
|
void set_y(int y) { y_ = y; }
|
||||||
//
|
|
||||||
y_ = y;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add(const Point &other) {
|
void add(const Point &other) {
|
||||||
this->x_ += other.x_;
|
this->x_ += other.x_;
|
||||||
@@ -113,6 +107,7 @@ TEST_CASE("Point", "[class]") {
|
|||||||
REQUIRE(point_result.get_x() == 2);
|
REQUIRE(point_result.get_x() == 2);
|
||||||
REQUIRE(point_result.get_y() == 4);
|
REQUIRE(point_result.get_y() == 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("test_class_method") {
|
SECTION("test_class_method") {
|
||||||
auto result = engine.call<int>("test_class_method");
|
auto result = engine.call<int>("test_class_method");
|
||||||
REQUIRE(result == 1);
|
REQUIRE(result == 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user