-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Code cleaning] - Fix shadow warnings
- Loading branch information
Showing
33 changed files
with
715 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ class ExchangePermanentCurlOptions { | |
|
||
} // namespace api | ||
|
||
} // namespace cct | ||
} // namespace cct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/basic-objects/test/monetaryamountbycurrencyset_test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "monetaryamountbycurrencyset.hpp" | ||
|
||
#include <gtest/gtest.h> | ||
|
||
namespace cct { | ||
|
||
class MonetaryAmountByCurrencySetTest : public ::testing::Test { | ||
protected: | ||
MonetaryAmountByCurrencySet set{MonetaryAmount("1.5 EUR"), MonetaryAmount("2.5 DOGE"), MonetaryAmount("3.5 BTC")}; | ||
}; | ||
|
||
TEST_F(MonetaryAmountByCurrencySetTest, InsertOrAssign) { | ||
set.insert_or_assign(MonetaryAmount("2.5 EUR")); | ||
auto it = set.find(CurrencyCode("EUR")); | ||
ASSERT_NE(it, set.end()); | ||
EXPECT_EQ(*it, MonetaryAmount("2.5 EUR")); | ||
} | ||
|
||
TEST_F(MonetaryAmountByCurrencySetTest, InsertOrAssignRange) { | ||
MonetaryAmountByCurrencySet other{MonetaryAmount("4 ETH"), MonetaryAmount("5.5 DOGE"), MonetaryAmount("6.5 POW")}; | ||
set.insert_or_assign(other.begin(), other.end()); // Inserting the same currency as in set should overwrite the value | ||
|
||
EXPECT_EQ(set.size(), 5U); | ||
|
||
MonetaryAmountByCurrencySet expected{MonetaryAmount("1.5 EUR"), MonetaryAmount("4 ETH"), MonetaryAmount("5.5 DOGE"), | ||
MonetaryAmount("6.5 POW"), MonetaryAmount("3.5 BTC")}; | ||
|
||
EXPECT_EQ(set, expected); | ||
} | ||
|
||
} // namespace cct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.