Skip to content

Commit

Permalink
Brokers*.h: Fix typo in ZoneContextBroker::tzVersion()
Browse files Browse the repository at this point in the history
  • Loading branch information
bxparks committed Jun 7, 2023
1 parent eba0a13 commit 2ada20b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/zoneinfo/BrokersHigh.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ZoneContextBroker {
}

const char* tzVersion() const {
return mZoneContext->onDayOfWeek;
return mZoneContext->tzVersion;
}

uint8_t numFragments() const {
Expand Down
2 changes: 1 addition & 1 deletion src/zoneinfo/BrokersLow.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class ZoneContextBroker {
}

const char* tzVersion() const {
return mZoneContext->onDayOfWeek;
return mZoneContext->tzVersion;
}

uint8_t numFragments() const {
Expand Down
2 changes: 1 addition & 1 deletion src/zoneinfo/BrokersMid.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class ZoneContextBroker {
}

const char* tzVersion() const {
return mZoneContext->onDayOfWeek;
return mZoneContext->tzVersion;
}

uint8_t numFragments() const {
Expand Down
6 changes: 6 additions & 0 deletions tests/BasicBrokerTest/BasicBrokerTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using namespace ace_time;
using ace_time::basic::ZoneContext;
using ace_time::basic::ZoneContextBroker;
using ace_time::basic::ZoneInfoBroker;
using ace_time::basic::ZoneEraBroker;
using ace_time::basic::ZoneRuleBroker;
Expand All @@ -21,6 +22,11 @@ using ace_time::zonedbtesting::kZoneIdAmerica_Los_Angeles;

//---------------------------------------------------------------------------

test(BasicBrokerTest, ZoneContextBroker) {
const char* tzVersion = ZoneContextBroker(&kZoneContext).tzVersion();
assertEqual("2023c", tzVersion);
}

test(BasicBrokerTest, ZoneRuleBroker_toYearFromTiny) {
ZoneRuleBroker rule(&kZoneContext, &kZonePolicyUS.rules[1]);
assertEqual(-32768, rule.toYearFromTiny(-128, 2100));
Expand Down
6 changes: 6 additions & 0 deletions tests/CompleteBrokerTest/CompleteBrokerTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using namespace ace_time;
using ace_time::complete::ZoneContext;
using ace_time::complete::ZoneContextBroker;
using ace_time::complete::ZoneInfoBroker;
using ace_time::complete::ZoneEraBroker;
using ace_time::complete::ZoneRuleBroker;
Expand All @@ -32,6 +33,11 @@ test(timeCodeToSeconds) {

//---------------------------------------------------------------------------

test(BasicBrokerTest, ZoneContextBroker) {
const char* tzVersion = ZoneContextBroker(&kZoneContext).tzVersion();
assertEqual("2023c", tzVersion);
}

test(CompleteBrokerTest, ZoneRuleBroker) {
ZoneRuleBroker rule(&kZoneContext, &kZonePolicyUS.rules[1]);
assertFalse(rule.isNull());
Expand Down
6 changes: 6 additions & 0 deletions tests/ExtendedBrokerTest/ExtendedBrokerTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using namespace ace_time;
using ace_time::extended::ZoneContext;
using ace_time::extended::ZoneContextBroker;
using ace_time::extended::ZoneInfoBroker;
using ace_time::extended::ZoneEraBroker;
using ace_time::extended::ZoneRuleBroker;
Expand All @@ -32,6 +33,11 @@ test(timeCodeToMinutes) {

//---------------------------------------------------------------------------

test(BasicBrokerTest, ZoneContextBroker) {
const char* tzVersion = ZoneContextBroker(&kZoneContext).tzVersion();
assertEqual("2023c", tzVersion);
}

test(ExtendedBrokerTest, ZoneRuleBroker) {
ZoneRuleBroker rule(&kZoneContext, &kZonePolicyUS.rules[1]);
assertFalse(rule.isNull());
Expand Down

0 comments on commit 2ada20b

Please sign in to comment.