Browse Source

DEV: Makefile rule correction and some warning suppression

doc
Christos Houtouridis 4 years ago
parent
commit
ee9b93317b
4 changed files with 21 additions and 17 deletions
  1. +6
    -1
      include/utl/com/_1wire_id.h
  2. +8
    -9
      test/Makefile
  3. +6
    -6
      test/gtest/gtest/gtest.h
  4. +1
    -1
      test/tests/test_1w_impl.cpp

+ 6
- 1
include/utl/com/_1wire_id.h View File

@@ -38,9 +38,14 @@ namespace utl {
public:
_1wire_id_t () noexcept
: id_t<uint8_t, 8> {0, 0, 0, 0, 0, 0, 0, 0} { }
_1wire_id_t (const _1wire_id_t& id) noexcept {
constexpr _1wire_id_t (const _1wire_id_t& id) noexcept {
std::copy(id.begin(), id.end(), this->begin());
}
_1wire_id_t operator=(const _1wire_id_t& id) noexcept {
_1wire_id_t r;
std::copy(id.begin(), id.end(), r.begin());
return r;
}
//!@}
/*!
* \name User functionality provided by the interface


+ 8
- 9
test/Makefile View File

@@ -20,7 +20,7 @@
#
# ========== Project settings ==========
TARGET := utlTest
TARGET := utlTest.exe
SRC_DIR := tests gtest
INC_DIR := ../include gtest
EXC_FILE :=
@@ -36,7 +36,7 @@ CXX := g++
CPP := g++ -E
CSIZE := size
CFLAGS := -std=c++14 -Wall #-Wextra
CFLAGS := -std=c++14 -Wall -Wextra
DEB_FLAGS := -DDEBUG -g3
REL_FLAGS := -O3
LDFLAGS :=
@@ -91,16 +91,15 @@ $(DEP):
include $(wildcard $(DEP))
# main target rule
$(BUILD_DIR)/%/$(TARGET): $(OBJ)
$(BUILD_DIR)/$(TARGET): $(OBJ)
@mkdir -p $(@D)
@echo Linking to target: $(TARGET)
@echo $(CXX) $(LDFLAGS) $(MAP_FLAG) -o $(@D)/$(TARGET) '$$(OBJ)'
@$(CXX) $(LDFLAGS) $(MAP_FLAG) -o $(@D)/$(TARGET) $(OBJ)
@echo
@echo Print size information
@$(CSIZE) $(@D)/$(TARGET)
@echo Done
# @echo
# @echo Print size information
# @$(CSIZE) $(@D)/$(TARGET)
.PHONY: clean
@@ -118,12 +117,12 @@ clean:
.PHONY: debug
debug: CFLAGS += $(DEB_FLAGS)
debug: $(BUILD_DIR)/debug/$(TARGET)
debug: $(BUILD_DIR)/$(TARGET)
.PHONY: release
release: CFLAGS += $(REL_FLAGS)
release: clean $(BUILD_DIR)/release/$(TARGET)
release: clean $(BUILD_DIR)/$(TARGET)
.PHONY: all


+ 6
- 6
test/gtest/gtest/gtest.h View File

@@ -15686,11 +15686,11 @@ class TestEventListener {
virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
// Fired before the test suite starts.
virtual void OnTestSuiteStart(const TestSuite& test_suite) {}
virtual void OnTestSuiteStart(const TestSuite& test_suite) { (void)test_suite; }
// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
virtual void OnTestCaseStart(const TestCase& test_case) {}
virtual void OnTestCaseStart(const TestCase& test_case) { (void)test_case; }
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
// Fired before the test starts.
@@ -15705,11 +15705,11 @@ class TestEventListener {
virtual void OnTestEnd(const TestInfo& test_info) = 0;
// Fired after the test suite ends.
virtual void OnTestSuiteEnd(const TestSuite& test_suite) {}
virtual void OnTestSuiteEnd(const TestSuite& test_suite) { (void)test_suite; }
// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
virtual void OnTestCaseEnd(const TestCase& test_case) {}
virtual void OnTestCaseEnd(const TestCase& test_case) { (void)test_case; }
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
// Fired before environment tear-down for each iteration of tests starts.
@@ -15741,7 +15741,7 @@ class EmptyTestEventListener : public TestEventListener {
void OnTestSuiteStart(const TestSuite& /*test_suite*/) override {}
// Legacy API is deprecated but still available
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
void OnTestCaseStart(const TestCase& tc /*test_suite*/) override {}
void OnTestCaseStart(const TestCase& tc /*test_suite*/) override { (void)tc; }
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
void OnTestStart(const TestInfo& /*test_info*/) override {}
@@ -15749,7 +15749,7 @@ class EmptyTestEventListener : public TestEventListener {
void OnTestEnd(const TestInfo& /*test_info*/) override {}
void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {}
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
void OnTestCaseEnd(const TestCase& tc /*test_suite*/) override {}
void OnTestCaseEnd(const TestCase& tc /*test_suite*/) override { (void)tc; }
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {}


+ 1
- 1
test/tests/test_1w_impl.cpp View File

@@ -36,7 +36,7 @@ namespace test_1w {
// return the given. This also mean no-device
return byte;
}
void UART_BR (uint32_t br) {} // imaginary baud-rate implementation
void UART_BR (uint32_t br) { (void)br; } // imaginary baud-rate implementation
};
// fixture


Loading…
Cancel
Save