Skip to content

Strange stuff happening with long long #943

Description

@arstrube

I built CppUTest thus in Cygwin:

$ make distclean
$ autoreconf -i ..
$ ../configure
$ make tdd

It says long long support is enabled. This is my simple test:

#include "CppUTest/TestHarness.h"
#include "CppUTest/CommandLineTestRunner.h"

TEST_GROUP(longlong) {
};

TEST(longlong, someValue) {
}

CPPUTEST_DEFAULT_MAIN

(yes, I know - it doesn't even do anything) and here is the result:

g++ -Wextra -Wall -Werror -g3 -O0  -std=c++11  -include"CppUTest/MemoryLeakDetectorNewMacros.h"   -I
/cygdrive/c/data/00_Dev/05_CppUTest/cpputest/include -L/cygdrive/c/data/00_Dev/05_CppUTest/cpputest/
lib OneTimeThrowAwayTests.cpp -lCppUTest -lCppUTestExt -o OneTimeThrowAwayTests.exe
/tmp/cc2WQ8Co.o:OneTimeThrowAwayTests.cpp:(.rdata$_ZTV33TEST_longlong_someValue_TestShell[__ZTV33TES
T_longlong_someValue_TestShell]+0x48): undefined reference to `UtestShell::assertLongLongsEqual(cppu
test_longlong, cpputest_longlong, char const*, char const*, int, TestTerminator const&)'
/tmp/cc2WQ8Co.o:OneTimeThrowAwayTests.cpp:(.rdata$_ZTV33TEST_longlong_someValue_TestShell[__ZTV33TES
T_longlong_someValue_TestShell]+0x4c): undefined reference to `UtestShell::assertUnsignedLongLongsEq
ual(cpputest_ulonglong, cpputest_ulonglong, char const*, char const*, int, TestTerminator const&)'
collect2: error: ld returned 1 exit status

I can produce more errors, too, but this one is kind of suprising - why would UtestShell::assertUnsignedLongLongsEqual() be referenced in the absence of any macro that uses it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions