llvm/libc/test/src/stdlib/strtof_test.cpp

//===-- Unittests for strtof ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/__support/FPUtil/FPBits.h"
#include "src/errno/libc_errno.h"
#include "src/stdlib/strtof.h"

#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/RoundingModeUtils.h"
#include "test/UnitTest/Test.h"

#include <stddef.h>

ForceRoundingModeTest;
RoundingMode;

class LlvmLibcStrToFTest : public LIBC_NAMESPACE::testing::Test,
                           ForceRoundingModeTest<RoundingMode::Nearest> {};

// This is the set of tests that I have working (verified correct when compared
// to system libc). This is here so I don't break more things when I try to fix
// them.

TEST_F(LlvmLibcStrToFTest, BasicDecimalTests) {}

TEST_F(LlvmLibcStrToFTest, DecimalOutOfRangeTests) {}

TEST_F(LlvmLibcStrToFTest, DecimalsWithRoundingProblems) {}

TEST_F(LlvmLibcStrToFTest, DecimalSubnormals) {}

TEST_F(LlvmLibcStrToFTest, DecimalWithLongExponent) {}

TEST_F(LlvmLibcStrToFTest, BasicHexadecimalTests) {}

TEST_F(LlvmLibcStrToFTest, HexadecimalSubnormalTests) {}

TEST_F(LlvmLibcStrToFTest, HexadecimalSubnormalRoundingTests) {}

TEST_F(LlvmLibcStrToFTest, HexadecimalNormalRoundingTests) {}

TEST_F(LlvmLibcStrToFTest, HexadecimalsWithRoundingProblems) {}

TEST_F(LlvmLibcStrToFTest, HexadecimalOutOfRangeTests) {}

TEST_F(LlvmLibcStrToFTest, InfTests) {}

TEST_F(LlvmLibcStrToFTest, SimpleNaNTests) {}

// These NaNs are of the form `NaN(n-character-sequence)` where the
// n-character-sequence is 0 or more letters or numbers. If there is anything
// other than a letter or a number, then the valid number is just `NaN`. If
// the sequence is valid, then the interpretation of them is implementation
// defined, in this case it's passed to strtoll with an automatic base, and
// the result is put into the mantissa if it takes up the whole width of the
// parentheses.
TEST_F(LlvmLibcStrToFTest, NaNWithParenthesesEmptyTest) {}

TEST_F(LlvmLibcStrToFTest, NaNWithParenthesesValidNumberTests) {}

TEST_F(LlvmLibcStrToFTest, NaNWithParenthesesInvalidSequenceTests) {}

TEST_F(LlvmLibcStrToFTest, NaNWithParenthesesValidSequenceInvalidNumberTests) {}