Skip to content

Commit

Permalink
Merge branch 'main' into develop/fix-compiler-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Nov 15, 2023
2 parents 9791b10 + 2adf5ae commit 79b590e
Show file tree
Hide file tree
Showing 1,524 changed files with 250,465 additions and 235,219 deletions.
99 changes: 99 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# prevent git from changing line endings for conan recipes and CMake files,
# since they are hashed to produce a conan recipe revision ID
conanfile.py text eol=lf
CMakeLists.txt text eol=lf
*.cmake text eol=lf
*.in text eol=lf

# Modern tools on Windows can handle Linux LF
# See https://stackoverflow.com/a/13154031/8877 for details
* text=auto eol=lf
*.* text=auto eol=lf
.git?* text=auto eol=lf

# Leave known Windows-only text files as CR/LF
*.sln text eol=crlf
*.dsw text eol=crlf
*.dsp text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.ruleset text eol=crlf
*.bat text eol=crlf

######################
# Known binary files

# Python builds with WAF
waf binary

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary
*.mex binary
*.pyc binary

# from various unit_test/ directories
*.dat binary
*.*hdr binary
*.flat binary
*.sig binary
*.bin binary
*.dump binary

# images
*.bmp binary
*.ico binary
*.tiff binary
*.tif binary
*.gif binary
*.jpg binary
*.jpeg binary
*.png binary
# SVG images are XML
*.svg text
*.raw binary
*.hei? binary
*.kmz binary

# music
*.mp3 binary
*.m4a binary
*.wav binary
*.wma binary

# video
*.m4v binary
*.avi binary
*.wmv binary
*.mkv binary

# documents
*.pdf binary
*.dvi binary
*.doc binary
*.docx binary
*.xls binary
*.xlsx binary
*.ppt binary
*.pptx binary

# SAR
*.h5 binary
*.sio binary
*.hdr binary
*.ntf binary
*.nitf binary
*.sidd binary
*.sicd? binary

# containers
*.zip binary
*.gz binary
*.tar binary
*.tgz binary
*.jar binary
2 changes: 1 addition & 1 deletion .github/workflows/frequent_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
cmake --build . --config ${{ matrix.configuration }} -j
cmake --build . --config ${{ matrix.configuration }} --target install
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1 # https://github.com/marketplace/actions/setup-msbuild
uses: microsoft/setup-msbuild@v1.0.2 # https://github.com/marketplace/actions/setup-msbuild
with:
msbuild-architecture: x64
- name: msbuild
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ six/modules/**/Makefile
*_config.hpp
# ignore build directories ...
build/
out/
# ... but not coda-oss/build
!/externals/coda-oss/build/

Expand Down
18 changes: 18 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

# SIX [Release](https://github.com/ngageoint/six-library/releases) Notes

## [Version 3.2.5](https://github.com/ngageoint/six-library/releases/tag/SIX-3.2.5); October 23, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) version [2023-10-23](https://github.com/mdaus/coda-oss/releases/tag/2023-10-23)
* [nitro](https://github.com/mdaus/nitro) version [2.11.5](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.5)
* Simplify 8AMP_PHSI interfaces.
* Be more explicit about the CPHD version being used.
* *io::OutputStream* overloads to make it easier to write CPHD data in pieces.
* Be sure XML strings are UTF-8.

## [Version 3.2.4](https://github.com/ngageoint/six-library/releases/tag/SIX-3.2.4); August 21, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) version [2023-08-18](https://github.com/mdaus/coda-oss/releases/tag/2023-08-18)
* [nitro](https://github.com/mdaus/nitro) version [2.11.4](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.4)
* Prepare for deprecating [`std::complex<short>`](https://en.cppreference.com/w/cpp/numeric/complex), et. al.
* Allow XML metadata to be parsed with `preserveCharacterData(true)` to keep white-space.
* Added support for [CPHD 1.1.0](https://nsgreg.nga.mil/doc/view?i=5388) XML metadata.
* Bugfix: read SIDDs [without a LUT](https://github.com/ngageoint/six-library/pull/683).
* Bugfix: [CPHD 'releaseInfo' can be empty](https://github.com/ngageoint/six-library/pull/670).
* Added **.gitattributes** and normalized line-endings (`\n` for most text files).

## [Version 3.2.3](https://github.com/ngageoint/six-library/releases/tag/SIX-3.2.3); June 5, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) version [2023-06-05](https://github.com/mdaus/coda-oss/releases/tag/2023-06-05)
* [nitro](https://github.com/mdaus/nitro) version [2.11.3](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.3)
Expand Down
84 changes: 41 additions & 43 deletions UnitTest/CppUnitTestAssert.cpp
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
#include "pch.h"
#include "TestCase.h"

#include "str/EncodedStringView.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

// EQUALS_MESSAGE() wants ToString() specializations (or overloads) for our types, which is a nusiance.
// This hooks up our existing str::toString() into the VC++ unit-test infrastructure

// C++ hack to call private methods
// https://stackoverflow.com/a/71578383/8877

using FailOnCondition_t = void(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare method's type
using GetAssertMessage_t = std::wstring(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare method's type
template <FailOnCondition_t fFailOnCondition, GetAssertMessage_t fGetAssertMessage>
struct caller final // helper structure to inject call() code
{
friend void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo)
{
fFailOnCondition(condition, message, pLineInfo);
}

friend std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message)
{
return fGetAssertMessage(equality, expected, actual, message);
}
};
template struct caller<&Assert::FailOnCondition, &Assert::GetAssertMessage>; // even instantiation of the helper

void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare caller
void test::Assert::FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo)
{
::FailOnCondition(condition, message, pLineInfo); // and call!
}

std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare caller
std::wstring test::Assert::GetAssertMessage(bool equality, const std::string& expected, const std::string& actual, const wchar_t *message)
{
const str::EncodedStringView vExpected(expected);
const str::EncodedStringView vActual(actual);
return ::GetAssertMessage(equality, vExpected.wstring(), vActual.wstring(), message); // and call!
}
#include "pch.h"
#include "TestCase.h"

#include "str/Encoding.h"

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

// EQUALS_MESSAGE() wants ToString() specializations (or overloads) for our types, which is a nusiance.
// This hooks up our existing str::toString() into the VC++ unit-test infrastructure

// C++ hack to call private methods
// https://stackoverflow.com/a/71578383/8877

using FailOnCondition_t = void(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare method's type
using GetAssertMessage_t = std::wstring(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare method's type
template <FailOnCondition_t fFailOnCondition, GetAssertMessage_t fGetAssertMessage>
struct caller final // helper structure to inject call() code
{
friend void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo)
{
fFailOnCondition(condition, message, pLineInfo);
}

friend std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message)
{
return fGetAssertMessage(equality, expected, actual, message);
}
};
template struct caller<&Assert::FailOnCondition, &Assert::GetAssertMessage>; // even instantiation of the helper

void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare caller
void test::Assert::FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo)
{
::FailOnCondition(condition, message, pLineInfo); // and call!
}

std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare caller
std::wstring test::Assert::GetAssertMessage(bool equality, const std::string& expected, const std::string& actual, const wchar_t *message)
{
return ::GetAssertMessage(equality, str::details::to_wstring(expected), str::details::to_wstring(actual), message); // and call!
}
Loading

0 comments on commit 79b590e

Please sign in to comment.