fix: add cmath to the gcc and llvm tests

This commit is contained in:
Amin Yahyaabadi 2022-05-20 17:52:48 -07:00
parent ade2538ede
commit 5524077a0f
5 changed files with 18 additions and 11 deletions

3
.gitignore vendored
View File

@ -15,4 +15,5 @@ temp-*
!./dist/setup_cpp.js
!./dist/setup_cpp.js.map
.parcel-cache
exe
*.log
*.exe

View File

@ -10,7 +10,7 @@ jest.setTimeout(3000000)
describe("setup-gcc", () => {
let directory: string
beforeAll(async () => {
directory = await setupTmpDir("doxygen")
directory = await setupTmpDir("gcc")
})
it("should setup gcc", async () => {
@ -37,6 +37,6 @@ describe("setup-gcc", () => {
})
afterAll(async () => {
await cleanupTmpDir("doxygen")
await cleanupTmpDir("gcc")
}, 100000)
})

View File

@ -8,11 +8,14 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <cmath>
int main() {
const auto x = 10.0;
std::cout << "Testing " << x << '\n';
const auto val1 = 10.0;
std::cout << "Testing " << val1 << '\n';
const auto y = std::to_string(x);
std::cout << "Testing " << y << '\n';
const auto val2 = std::to_string(val1);
std::cout << "Testing " << val2 << '\n';
return static_cast<int>(std::sin(val1) + std::log(static_cast<double>(val2.size())) - 1);
}

Binary file not shown.

View File

@ -8,11 +8,14 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <cmath>
int main() {
const auto x = 10.0;
std::cout << "Testing " << x << '\n';
const auto val1 = 10.0;
std::cout << "Testing " << val1 << '\n';
const auto y = std::to_string(x);
std::cout << "Testing " << y << '\n';
const auto val2 = std::to_string(val1);
std::cout << "Testing " << val2 << '\n';
return static_cast<int>(std::sin(val1) + std::log(static_cast<double>(val2.size())) - 1);
}