Skip to content

LoggerTests fail #8

@NoRePercussions

Description

@NoRePercussions

Describe the bug
The 5 logging type LoggerTests fail.

Expected equality of these values:
  line
    Which is: NULL
  "EMPTY_FILE"

Inspection reveals that the getline fails:

.../OkapiLib/test/loggerTests.cpp:52: Failure
Expected: (getline(&line, &len, logFile)) != ((-1)), actual: -1 vs -1

Flushing or rewinding the buffer does not help.

Additionally, LoggerTest.TestLazyLogging succeeds, but only because it does not test the output. To check if lazy logging actually works, it should probably test the output.

Steps To Reproduce
Run the LoggerTest tests:

$ ./OkapiLibV5 --gtest_filter="LoggerTest*"

Expected behavior
Tests should pass and getline should not fail to read from the file

Versions
OkapiLib 5 / PurdueSigBots maintenance fork

Additional Information
Compiled with Clang.

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