Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Continue refactoring libndt #142

Merged
merged 4 commits into from
Nov 18, 2019
Merged

Continue refactoring libndt #142

merged 4 commits into from
Nov 18, 2019

Conversation

bassosimone
Copy link
Member

@bassosimone bassosimone commented Nov 14, 2019

Because libndt seems to be poised to become the default ndt5/ndt7 client offer for C++ users, I am going to do some more effort to ease its development, and to apply more best practices.

Namely, my objective is for a developer to be able to reason to individual libndt components in isolation, by inspecting the related sub-header and unit-tests.

In a previous refactoring commit, I tentatively started moving such sub-headers into a sub-directory, but now I realise this is partially confusing. It seems we already have tests into the top-level directory, hence I'd rather take the approach of having foo.hpp as subheader and foo_test.cpp as the related unit tests.

I am not 100% satisfied with this approach as well, however, I'd say it's better to first finish splitting the library and have true unti tests. Then, we can provide more structure in a single commit that does not leave the tree in a state where the placement of files is inconsistent.

Thus, this PR mainly flattens the hierarchy. In addition to that, it also performs the necessary changes to make sure that the sys.hpp header really works as a standalone header, because its related unit test file compiles successfully.

Part of #144

This is more consistent with us having already tests in the
current directory that can be associated to files.

My goal is to replicate the Go model where you have file.go and
file_test.go containing tests for such file.
We know this because we're using sys_test.cpp to compile it
and make sure everything is working as intended.

This is in line with making libndt components less intertwined
and making sure we can test them in isolation.
@bassosimone bassosimone added the enhancement New feature or request label Nov 14, 2019
@bassosimone bassosimone self-assigned this Nov 14, 2019
@bassosimone bassosimone merged commit ec2f1df into master Nov 18, 2019
@bassosimone bassosimone deleted the develop branch November 18, 2019 09:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants