[libc-commits] [libc] [libc][test] make `str_to_float_comparison_test` independent of C++ headers. (PR #133978)
Muhammad Bassiouni via libc-commits
libc-commits at lists.llvm.org
Sat Apr 5 12:03:57 PDT 2025
================
@@ -54,80 +56,112 @@ static inline uint64_t fastHexToU64(const char *inStr) {
return result;
}
-int checkFile(char *inputFileName, int *totalFails, int *totalBitDiffs,
- int *detailedBitDiffs, int *total) {
- int32_t curFails = 0; // Only counts actual failures, not bitdiffs.
- int32_t curBitDiffs = 0; // A bitdiff is when the expected result and actual
- // result are off by +/- 1 bit.
- std::string line;
- std::string num;
+static void parseLine(char *line, int *total, int *detailedBitDiffs,
+ int32_t &curFails, int32_t &curBitDiffs) {
- std::ifstream fileStream(inputFileName, std::ifstream::in);
-
- if (!fileStream.is_open()) {
- std::cout << "file '" << inputFileName << "' failed to open. Exiting.\n";
- return 1;
+ if (line[0] == '#') {
----------------
bassiounix wrote:
the text file has `#` as a comment.
unless the content is edited, no I can't really remove it!
https://github.com/llvm/llvm-project/pull/133978
More information about the libc-commits
mailing list