SHA256
merge
This commit is contained in:
+4
-4
@@ -4,8 +4,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# 定义源文件
|
||||
set(BETTERSTL_SOURCES
|
||||
src/BigInteger.cpp
|
||||
src/BigDecimal.cpp)
|
||||
src/big_integer.cpp
|
||||
src/big_decimal.cpp)
|
||||
|
||||
# 生成静态库 (.a 文件)
|
||||
add_library(BetterSTL_static STATIC ${BETTERSTL_SOURCES})
|
||||
@@ -26,12 +26,12 @@ add_library(BetterSTL ALIAS BetterSTL_static)
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_executable(BigIntegerTests tests/BigIntegerTest.cpp)
|
||||
add_executable(BigIntegerTests tests/big_integer_test.cpp)
|
||||
target_include_directories(BigIntegerTests PRIVATE include)
|
||||
target_link_libraries(BigIntegerTests PRIVATE BetterSTL_static)
|
||||
add_test(NAME BigIntegerTests COMMAND BigIntegerTests)
|
||||
|
||||
add_executable(BigDecimalTests tests/BigDecimalTest.cpp)
|
||||
add_executable(BigDecimalTests tests/big_decimal_test.cpp)
|
||||
target_include_directories(BigDecimalTests PRIVATE include)
|
||||
target_link_libraries(BigDecimalTests PRIVATE BetterSTL_static)
|
||||
add_test(NAME BigDecimalTests COMMAND BigDecimalTests)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#ifndef BETTERSTL_BIG_DECIMAL_H
|
||||
#define BETTERSTL_BIG_DECIMAL_H
|
||||
|
||||
#include <string>
|
||||
#include "BigInteger.hpp"
|
||||
#include <bstl/big_integer.hpp>
|
||||
|
||||
namespace bstl {
|
||||
|
||||
class BigDecimal {
|
||||
public:
|
||||
BigDecimal();
|
||||
@@ -70,3 +70,5 @@ private:
|
||||
};
|
||||
|
||||
} // namespace bstl
|
||||
|
||||
#endif //BETTERSTL_BIG_DECIMAL_H
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef BETTERSTL_BIG_INTEGER_HPP
|
||||
#define BETTERSTL_BIG_INTEGER_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -64,6 +65,6 @@ private:
|
||||
static std::string divAbs(const std::string& a, const std::string& b);
|
||||
};
|
||||
|
||||
using BitInteger = BigInteger;
|
||||
|
||||
} // namespace bstl
|
||||
|
||||
#endif //BETTERSTL_BIG_INTEGER_HPP
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef BETTERSTL_BIG_NUMBERS_HPP
|
||||
#define BETTERSTL_BIG_NUMBERS_HPP
|
||||
|
||||
#include <bstl/biginteger.hpp>
|
||||
#include <bstl/bigdecimal.hpp>
|
||||
|
||||
#endif // BETTERSTL_BIG_NUMBERS_HPP
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef BETTERSTL_BIGDECIMAL_H
|
||||
#define BETTERSTL_BIGDECIMAL_H
|
||||
|
||||
#endif //BETTERSTL_BIGDECIMAL_H
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef BETTERSTL_BIGINTEGER_HPP
|
||||
#define BETTERSTL_BIGINTEGER_HPP
|
||||
|
||||
#endif //BETTERSTL_BIGINTEGER_HPP
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef BETTERSTL_BIGNUMS_HPP
|
||||
#define BETTERSTL_BIGNUMS_HPP
|
||||
|
||||
#include <bstl/biginteger.hpp>
|
||||
#include <bstl/bigdecimal.hpp>
|
||||
|
||||
#endif //BETTERSTL_BIGNUMS_HPP
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
#ifndef BETTERSTL_BSTL_HPP
|
||||
#include<bstl/BigDecimal.hpp>
|
||||
#include<bstlBigInteger.hpp>
|
||||
|
||||
#include<bstl/big_decimal.hpp>
|
||||
#include<bstl/big_integer.hpp>
|
||||
#include <bstl/bstlint.hpp>
|
||||
|
||||
#define BETTERSTL_BSTL_HPP
|
||||
#endif //BETTERSTL_BSTL_HPP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "BigDecimal.hpp"
|
||||
#include <bstl/big_decimal.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "BigInteger.hpp"
|
||||
#include <bstl/big_integer.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <BigDecimal.hpp>
|
||||
#include <bstl/big_decimal.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <BigInteger.hpp>
|
||||
#include <bstl/big_integer.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
Reference in New Issue
Block a user