Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPP] Add unit test #111

Closed
761417898 opened this issue Jun 13, 2024 · 7 comments · Fixed by #134
Closed

[CPP] Add unit test #111

761417898 opened this issue Jun 13, 2024 · 7 comments · Fixed by #134

Comments

@761417898
Copy link
Contributor

Does the TsFile_CPP project require unit tests? Can we use third-party libraries such as Gtest or CppUnit ?

Copy link

Hi, this is your first issue in the Apache TsFile project. Thanks for your report. Welcome to join the community!

@chrisdutz
Copy link
Contributor

So this is more a legal than a technical question .. from a quick check Gtest is BSD 3-Clause Licensed, which is ok .. CppUnit is GPL licensed, which is not ok.

We probably should remove the tooling for Unity integration as this seems to be a pure C test setup which we will most probably not be using.

@chrisdutz
Copy link
Contributor

This looks as if integrating it into our build would be simple:
https://google.github.io/googletest/quickstart-cmake.html

@jt2594838
Copy link
Contributor

Good job. But I am afraid that we are facing something more challenging: verifying that TsFiles generated by the CPP edition can be read by the Java edition and vice versa.

The motivation is that I just found the dictionary encoding implementation is different on both sides. Other similar issues would better be detected automatically.

Any idea about this?

@chrisdutz
Copy link
Contributor

I guess an "integration-test" sub-module makes sense for this ... I would however think that this issue is about unit-testing the Cpp code itself, right?

@jt2594838
Copy link
Contributor

Of course, we should open another issue for it.

@761417898
Copy link
Contributor Author

This looks as if integrating it into our build would be simple: https://google.github.io/googletest/quickstart-cmake.html

The unit test framework chosen is GTest, as recommended by Chris.
The unit tests have been implemented for the common utils file encoding section. Here is the MR #134

@HTHou HTHou linked a pull request Jul 5, 2024 that will close this issue
@HTHou HTHou closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants