From a8567a9fecbab5b60c4e6ef8a27af098efcb4f38 Mon Sep 17 00:00:00 2001 From: VeryAmazed Date: Tue, 7 May 2024 23:52:15 -0400 Subject: [PATCH] added some asserts to get rid of some warning --- tests/density/ACTG.cpp | 4 ++-- tests/density/non-ACTG.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/density/ACTG.cpp b/tests/density/ACTG.cpp index 325218a..06b0263 100644 --- a/tests/density/ACTG.cpp +++ b/tests/density/ACTG.cpp @@ -37,7 +37,7 @@ int main() { std::string str; std::vector strs; - freopen("../tests/density/ACTG.txt", "r", stdin); + assert(freopen("../tests/density/ACTG.txt", "r", stdin)); for (int i = 0; i < 100; i++) { std::cin >> str; strs.pb(str); @@ -87,7 +87,7 @@ int main() { sync_vec[i].pb(am); } } - freopen("../tests/density/out1.txt", "w", stdout); + assert(freopen("../tests/density/out1.txt", "w", stdout)); for (int i = 0; i < 4; i++) { for (size_t j = 0; j < 100; j++) { std::cout << mod_min_vec[i][j] << " "; diff --git a/tests/density/non-ACTG.cpp b/tests/density/non-ACTG.cpp index f35e9b1..6cc0dcf 100644 --- a/tests/density/non-ACTG.cpp +++ b/tests/density/non-ACTG.cpp @@ -60,7 +60,7 @@ int main() { std::string str; std::vector strs; - freopen("../tests/density/non-ACTG.txt", "r", stdin); + assert(freopen("../tests/density/non-ACTG.txt", "r", stdin)); for (int i = 0; i < 100; i++) { std::cin >> str; strs.pb(str); @@ -132,7 +132,7 @@ int main() { sync_vec[i].pb(am); } } - freopen("../tests/density/out2.txt", "w", stdout); + assert(freopen("../tests/density/out2.txt", "w", stdout)); for (int i = 0; i < 4; i++) { for (size_t j = 0; j < 100; j++) { std::cout << mod_min_vec[i][j] << " ";