[DEBUG] build is back
This commit is contained in:
parent
8b3942b7d2
commit
2d54069b71
@ -25,14 +25,14 @@ namespace audio {
|
||||
class double_t;
|
||||
}
|
||||
|
||||
#define INT24_MIN 0xFFFFFFFFFF800000LL
|
||||
#define INT24_MAX 0x00000000007FFFFFLL
|
||||
extern const int64_t INT24_MIN;
|
||||
extern const int64_t INT24_MAX;
|
||||
|
||||
#define INT40_MIN 0xFFFFFF8000000000LL
|
||||
#define INT40_MAX 0x0000007FFFFFFFFFLL
|
||||
extern const int64_t INT40_MIN;
|
||||
extern const int64_t INT40_MAX;
|
||||
|
||||
#define INT56_MIN 0xFFFF800000000000LL
|
||||
#define INT56_MAX 0x00007FFFFFFFFFFFLL
|
||||
extern const int64_t INT56_MIN;
|
||||
extern const int64_t INT56_MAX;
|
||||
|
||||
#include <audio/int8_8_t.hpp>
|
||||
#include <audio/int8_16_t.hpp>
|
||||
|
@ -26,6 +26,7 @@ def get_version():
|
||||
def configure(target, my_module):
|
||||
my_module.add_src_file([
|
||||
'audio/debug.cpp',
|
||||
'audio/types.cpp',
|
||||
'audio/channel.cpp',
|
||||
'audio/format.cpp',
|
||||
'audio/Time.cpp',
|
||||
|
@ -157,7 +157,7 @@ TEST(TestBase, type_float_t) {
|
||||
|
||||
TEST(TestBase, type_double_t) {
|
||||
audio::double_t typeBase(16, 0);
|
||||
EXPECT_EQ(int64_t(typeBase.get()), 16LL);
|
||||
EXPECT_EQ(int64_t(typeBase.get()), 16);
|
||||
EXPECT_EQ(typeBase.get(), 16.0); // Note : double point error
|
||||
typeBase.set(-250.0);
|
||||
EXPECT_EQ(typeBase.get(), -250.0);
|
||||
|
@ -17,10 +17,7 @@ extern "C" {
|
||||
|
||||
|
||||
int main(int _argc, const char** _argv) {
|
||||
// init Google test :
|
||||
::testing::InitGoogleTest(&_argc, const_cast<char **>(_argv));
|
||||
// the only one init for etk:
|
||||
etk::init(_argc, _argv);
|
||||
etest::init(_argc, _argv);
|
||||
for (int32_t iii=0; iii<_argc ; ++iii) {
|
||||
etk::String data = _argv[iii];
|
||||
if ( data == "-h"
|
||||
|
@ -55,7 +55,7 @@ TEST(TestInt24_24, basicOperatorMultiplication) {
|
||||
*/
|
||||
|
||||
|
||||
#define RESULT_VALUE (2621440)
|
||||
static const int64_t RESULT_VALUE = 2621440;
|
||||
|
||||
TEST(TestInt24_24, basicConstructorInt8_8) {
|
||||
audio::int24_24_t out(audio::int8_8_t(5,4));
|
||||
|
@ -16,12 +16,14 @@ TEST(TestInt32_32, basicConstructorBase) {
|
||||
|
||||
TEST(TestInt32_32, basicConstructorSetOne) {
|
||||
audio::int32_32_t typeBase(1, 0);
|
||||
EXPECT_EQ(typeBase.get(), ((1LL<<31)-1));
|
||||
int64_t ret = ((1LL<<31)-1);
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt32_32, basicConstructorSetLessOne) {
|
||||
audio::int32_32_t typeBase(-1, 0);
|
||||
EXPECT_EQ(typeBase.get(), (-(1LL<<31)));
|
||||
int64_t ret = (-(1LL<<31));
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt32_32, basicOperatorEqual) {
|
||||
@ -184,7 +186,7 @@ TEST(TestInt32_32, basicOperatorDecrementPre) {
|
||||
*/
|
||||
|
||||
|
||||
#define RESULT_VALUE (671088640)
|
||||
static const int64_t RESULT_VALUE = (671088640);
|
||||
|
||||
TEST(TestInt32_32, basicConstructorInt8_8) {
|
||||
audio::int32_32_t out(audio::int8_8_t(5,4));
|
||||
|
@ -16,12 +16,14 @@ TEST(TestInt32_64, basicConstructorBase) {
|
||||
|
||||
TEST(TestInt32_64, basicConstructorSetOne) {
|
||||
audio::int32_64_t typeBase(1, 0);
|
||||
EXPECT_EQ(typeBase.get(), ((1LL<<32)));
|
||||
int64_t ret = ((1LL<<32));
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt32_64, basicConstructorSetLessOne) {
|
||||
audio::int32_64_t typeBase(-1, 0);
|
||||
EXPECT_EQ(typeBase.get(), (-(1LL<<32)));
|
||||
int64_t ret = (-(1LL<<32));
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt32_64, basicOperatorEqual) {
|
||||
@ -50,7 +52,8 @@ TEST(TestInt32_64, basicOperatorMultiplication) {
|
||||
EXPECT_EQ(typeBase.get(), -35);
|
||||
typeBase = audio::double_t(0.6);
|
||||
typeBase *= audio::double_t(0.3);
|
||||
EXPECT_EQ(typeBase.get(), 773094112LL);
|
||||
int64_t ret = 773094112LL;
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
|
||||
@ -182,7 +185,7 @@ TEST(TestInt32_64, basicOperatorDecrementPre) {
|
||||
EXPECT_EQ(out.get(), audio::int32_64_t(9, 0).get());
|
||||
}
|
||||
|
||||
#define RESULT_VALUE (1342177280LL)
|
||||
static const int64_t RESULT_VALUE = (1342177280LL);
|
||||
|
||||
TEST(TestInt32_64, basicConstructorInt8_8) {
|
||||
audio::int32_64_t out(audio::int8_8_t(5,4));
|
||||
|
@ -15,13 +15,15 @@ TEST(TestInt64_64, basicConstructorBase) {
|
||||
|
||||
TEST(TestInt64_64, basicConstructorSetOne) {
|
||||
// only one way to set the maximum value
|
||||
int64_t ret = 0x7FFFFFFFFFFFFFFFLL;
|
||||
audio::int64_64_t typeBase(0x7FFFFFFFFFFFFFFFLL, 63);
|
||||
EXPECT_EQ(typeBase.get(), 0x7FFFFFFFFFFFFFFFLL);
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt64_64, basicConstructorSetLessOne) {
|
||||
audio::int64_64_t typeBase(-1, 0);
|
||||
EXPECT_EQ(typeBase.get(), (-(1LL<<63)));
|
||||
int64_t ret = (-(1LL<<63));
|
||||
EXPECT_EQ(typeBase.get(),ret);
|
||||
}
|
||||
|
||||
TEST(TestInt64_64, basicOperatorEqual) {
|
||||
@ -50,7 +52,8 @@ TEST(TestInt64_64, basicOperatorMultiplication) {
|
||||
EXPECT_EQ(typeBase.get(), -35);
|
||||
typeBase = audio::double_t(0.6);
|
||||
typeBase *= audio::double_t(0.3);
|
||||
EXPECT_EQ(typeBase.get(), 1660206965216520438LL);
|
||||
uint64_t ret = 1660206965216520438LL;
|
||||
EXPECT_EQ(typeBase.get(), ret);
|
||||
}
|
||||
|
||||
TEST(TestInt64_64, basicOperatorCompareEquality) {
|
||||
@ -184,8 +187,7 @@ TEST(TestInt64_64, basicOperatorDecrementPre) {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#define RESULT_VALUE (2882303761517117440LL)
|
||||
static const uint64_t RESULT_VALUE = (2882303761517117440LL);
|
||||
|
||||
TEST(TestInt64_64, basicConstructorInt8_8) {
|
||||
audio::int64_64_t out(audio::int8_8_t(5,4));
|
||||
|
@ -15,12 +15,12 @@ TEST(TestInt8_16, basicConstructorBase) {
|
||||
|
||||
TEST(TestInt8_16, basicConstructorSetOne) {
|
||||
audio::int8_16_t typeBase(1, 0);
|
||||
EXPECT_EQ(typeBase.get(), ((1LL<<8)));
|
||||
EXPECT_EQ(typeBase.get(), ((1<<8)));
|
||||
}
|
||||
|
||||
TEST(TestInt8_16, basicConstructorSetLessOne) {
|
||||
audio::int8_16_t typeBase(-1, 0);
|
||||
EXPECT_EQ(typeBase.get(), (-(1LL<<8)));
|
||||
EXPECT_EQ(typeBase.get(), (-(1<<8)));
|
||||
}
|
||||
|
||||
TEST(TestInt8_16, basicOperatorEqual) {
|
||||
|
@ -16,12 +16,12 @@ TEST(TestInt8_8, basicConstructorBase) {
|
||||
|
||||
TEST(TestInt8_8, basicConstructorSetOne) {
|
||||
audio::int8_8_t typeBase(1, 0);
|
||||
EXPECT_EQ(typeBase.get(), ((1LL<<7)-1));
|
||||
EXPECT_EQ(typeBase.get(), ((1<<7)-1));
|
||||
}
|
||||
|
||||
TEST(TestInt8_8, basicConstructorSetLessOne) {
|
||||
audio::int8_8_t typeBase(-1, 0);
|
||||
EXPECT_EQ(typeBase.get(), (-(1LL<<7)));
|
||||
EXPECT_EQ(typeBase.get(), (-(1<<7)));
|
||||
}
|
||||
|
||||
TEST(TestInt8_8, basicOperatorEqual) {
|
||||
|
Loading…
Reference in New Issue
Block a user