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

Commit e1e447d

Browse files
Time Dev Teampercivalgambit
authored andcommitted
No public description
PiperOrigin-RevId: 720187858
1 parent 9309007 commit e1e447d

File tree

8 files changed

+29
-59
lines changed

8 files changed

+29
-59
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

BUILD.bazel

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2+
3+
4+
5+
license(
6+
name = "license",
7+
package_name = "unsmear",
8+
)
9+
110
licenses(["notice"])
211

312
exports_files(["LICENSE"])
@@ -36,8 +45,8 @@ cc_test(
3645
srcs = ["unsmear/duration_test.cc"],
3746
deps = [
3847
":unsmear",
39-
"@com_google_absl//absl/time",
4048
"@com_google_googletest//:gtest_main",
49+
"@com_google_absl//absl/time",
4150
],
4251
)
4352

@@ -47,7 +56,6 @@ cc_test(
4756
deps = [
4857
":unsmear",
4958
"@com_google_googletest//:gtest_main",
50-
"@com_google_protobuf//:protobuf",
5159
],
5260
)
5361

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
> [!WARNING]
2+
> This project is no longer being maintained as a github open source library.
3+
> The source in the github repository is valid through 2025-12-31.
4+
5+
16
# Unsmear
27

38
This C++ library converts precisely between timestamps in the timescale of

WORKSPACE

Lines changed: 0 additions & 41 deletions
This file was deleted.

leap_table/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ cc_binary(
2222
name = "leap_table_tool",
2323
srcs = ["leap_table_tool.cc"],
2424
deps = [
25-
"//:leap_table_cc_proto",
26-
"//:unsmear",
2725
"@com_google_absl//absl/flags:flag",
2826
"@com_google_absl//absl/flags:parse",
2927
"@com_google_absl//absl/log",
3028
"@com_google_absl//absl/log:check",
3129
"@com_google_absl//absl/log:initialize",
3230
"@com_google_absl//absl/strings",
3331
"@com_google_protobuf//:protobuf",
32+
"//:unsmear",
33+
"//:leap_table_cc_proto",
3434
],
3535
)
3636

@@ -39,7 +39,7 @@ cc_test(
3939
srcs = ["current_leap_table_test.cc"],
4040
data = [":leap_table_data"],
4141
deps = [
42-
"//:unsmear",
4342
"@com_google_googletest//:gtest_main",
43+
"//:unsmear",
4444
],
4545
)

leap_table/leap_table.textpb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ positive_leaps: 2454832
2525
positive_leaps: 2456109
2626
positive_leaps: 2457204
2727
positive_leaps: 2457754
28-
29-
# This file has been updated through IERS Bulletin C Number 68.
28+
end_jdn: 2461040
29+
# This file has been updated through IERS Bulletin C Number 69
3030
# https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html
31-
end_jdn: 2460856

leap_table/leap_table_tool.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ bool OutputTextProto(const unsmear::LeapTableProto& pb) {
101101

102102
bool OutputJson(const unsmear::LeapTableProto& pb) {
103103
std::string s;
104-
google::protobuf::util::JsonOptions opts;
104+
google::protobuf::util::JsonPrintOptions opts;
105105
if (!google::protobuf::util::MessageToJsonString(pb, &s, opts).ok()) {
106106
return false;
107107
}

unsmear/leap_table_test.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ TEST_F(LeapTableTest, PastExpiration) {
238238
}
239239

240240
TEST_F(LeapTableTest, ToProto) {
241-
LeapTableProto proto2;
242-
lt_->ToProto(&proto2);
241+
LeapTableProto leap_proto;
242+
lt_->ToProto(&leap_proto);
243243

244244
std::string diffs;
245245
google::protobuf::util::MessageDifferencer differencer;
246246
differencer.set_report_matches(true);
247247
differencer.ReportDifferencesToString(&diffs);
248-
ASSERT_TRUE(differencer.Compare(proto_, proto2)) << diffs;
248+
ASSERT_TRUE(differencer.Compare(proto_, leap_proto)) << diffs;
249249

250-
auto lt2 = NewLeapTableFromProto(proto2);
250+
auto lt2 = NewLeapTableFromProto(leap_proto);
251251
ASSERT_TRUE(lt2 != nullptr);
252252
ASSERT_EQ(*lt_, *lt2);
253253
}
@@ -256,10 +256,10 @@ TEST_F(LeapTableTest, EqualityOperators) {
256256
EXPECT_TRUE(*lt_ == *lt_);
257257
EXPECT_FALSE(*lt_ != *lt_);
258258

259-
LeapTableProto proto2;
260-
proto2.add_positive_leaps(2441499); // 1972-06-30 12:00:00 UTC
261-
proto2.set_end_jdn(2442412); // 1974-12-30 12:00:00 UTC
262-
auto lt2 = NewLeapTableFromProto(proto2);
259+
LeapTableProto leap_proto;
260+
leap_proto.add_positive_leaps(2441499); // 1972-06-30 12:00:00 UTC
261+
leap_proto.set_end_jdn(2442412); // 1974-12-30 12:00:00 UTC
262+
auto lt2 = NewLeapTableFromProto(leap_proto);
263263
ASSERT_TRUE(lt2 != nullptr);
264264

265265
EXPECT_FALSE(*lt_ == *lt2);

0 commit comments

Comments
 (0)