Skip to content

Commit

Permalink
- macos-11; + test-008_format
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMirzayanov committed Sep 22, 2024
1 parent 5c1ee38 commit 748bcf3
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,35 +146,6 @@ jobs:
cd tests
bash ./run.sh ${{ matrix.compiler }} v${{ matrix.version }} 32
tests-macos11-gpp:
strategy:
matrix:
os: [macos-11]
compiler: [g++]
version: [10, 11, 12]
name: Use ${{ matrix.compiler }}-${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Run tests
run: |
cd tests
bash ./run.sh ${{ matrix.compiler }} v${{ matrix.version }}
tests-macos11-clang:
strategy:
matrix:
os: [macos-11]
compiler: [clang++]
name: Use ${{ matrix.compiler }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Run tests
run: |
cd tests
bash ./run.sh ${{ matrix.compiler }}
tests-macos12-gpp:
strategy:
matrix:
Expand Down
14 changes: 14 additions & 0 deletions tests/test-008_format/files/test-format.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "testlib.h"

using namespace std;

int main(int argc, char** argv) {
registerGen(argc, argv, 1);

println(format("%d", 42));
println(format("hello, %s!", "hat"));
println(format("%s%d!", "'hat'", 42));
println(format("%s%d!", "'%s'", 42));

ensure(format("%f", 42.5).substr(0, 4) == "42.5");
}
1 change: 1 addition & 0 deletions tests/test-008_format/refs/test-format/r1/exit_code
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Empty file.
4 changes: 4 additions & 0 deletions tests/test-008_format/refs/test-format/r1/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
42
hello, hat!
'hat'42!
'%s'42!
1 change: 1 addition & 0 deletions tests/test-008_format/refs/test-format/r2/exit_code
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Empty file.
4 changes: 4 additions & 0 deletions tests/test-008_format/refs/test-format/r2/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
42
hello, hat!
'hat'42!
'%s'42!
7 changes: 7 additions & 0 deletions tests/test-008_format/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -eo pipefail

bash ../scripts/compile files/test-format.cpp
bash ../scripts/test-ref test-format/r1 ./test-format
bash ../scripts/test-ref test-format/r2 "$VALGRIND" ./test-format
rm -f test-format test-format.exe

0 comments on commit 748bcf3

Please sign in to comment.