Skip to content

Commit

Permalink
Use stop instead of stop_. (#9735)
Browse files Browse the repository at this point in the history
Small fix to inconsistent variable names in tests, following up from #9571.

Previous conversation: #9571 (comment)

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Vukasin Milovanovic (https://github.com/vuule)

URL: #9735
  • Loading branch information
bdice authored Nov 19, 2021
1 parent 68beed9 commit 09a8a47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
11 changes: 5 additions & 6 deletions cpp/tests/datetime/datetime_ops_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,9 @@ TYPED_TEST(TypedDatetimeOpsTest, TestExtractingGeneratedDatetimeComponents)
using namespace cudf::datetime;
using namespace cuda::std::chrono;

auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto timestamps =
generate_timestamps<T>(this->size(), time_point_ms(start), time_point_ms(stop_));
auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto stop = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto timestamps = generate_timestamps<T>(this->size(), time_point_ms(start), time_point_ms(stop));

auto expected_years =
fixed_width_column_wrapper<int16_t>{1890, 1906, 1922, 1938, 1954, 1970, 1985, 2001, 2017, 2033};
Expand Down Expand Up @@ -221,9 +220,9 @@ TYPED_TEST(TypedDatetimeOpsTest, TestExtractingGeneratedNullableDatetimeComponen
using namespace cuda::std::chrono;

auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto stop = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto timestamps =
generate_timestamps<T, true>(this->size(), time_point_ms(start), time_point_ms(stop_));
generate_timestamps<T, true>(this->size(), time_point_ms(start), time_point_ms(stop));

auto expected_years = fixed_width_column_wrapper<int16_t>{
{1890, 1906, 1922, 1938, 1954, 1970, 1985, 2001, 2017, 2033},
Expand Down
15 changes: 7 additions & 8 deletions cpp/tests/wrappers/timestamps_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ TYPED_TEST(ChronoColumnTest, ChronoDurationsMatchPrimitiveRepresentation)
using namespace cudf::test;
using namespace cuda::std::chrono;

auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto stop_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto chrono_col =
generate_timestamps<T>(this->size(), time_point_ms(start), time_point_ms(stop_));
auto start = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto stop = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto chrono_col = generate_timestamps<T>(this->size(), time_point_ms(start), time_point_ms(stop));

// round-trip through the host to copy `chrono_col` values
// to a new fixed_width_column_wrapper `primitive_col`
Expand Down Expand Up @@ -135,14 +134,14 @@ TYPED_TEST(ChronoColumnTest, ChronosCanBeComparedInDeviceCode)

auto start_lhs = milliseconds(-2500000000000); // Sat, 11 Oct 1890 19:33:20 GMT
auto start_rhs = milliseconds(-2400000000000); // Tue, 12 Dec 1893 05:20:00 GMT
auto stop_lhs_ = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto stop_rhs_ = milliseconds(2600000000000); // Wed, 22 May 2052 14:13:20 GMT
auto stop_lhs = milliseconds(2500000000000); // Mon, 22 Mar 2049 04:26:40 GMT
auto stop_rhs = milliseconds(2600000000000); // Wed, 22 May 2052 14:13:20 GMT

auto chrono_lhs_col =
generate_timestamps<T>(this->size(), time_point_ms(start_lhs), time_point_ms(stop_lhs_));
generate_timestamps<T>(this->size(), time_point_ms(start_lhs), time_point_ms(stop_lhs));

auto chrono_rhs_col =
generate_timestamps<T>(this->size(), time_point_ms(start_rhs), time_point_ms(stop_rhs_));
generate_timestamps<T>(this->size(), time_point_ms(start_rhs), time_point_ms(stop_rhs));

rmm::device_uvector<int32_t> indices(this->size(), rmm::cuda_stream_default);
thrust::sequence(rmm::exec_policy(), indices.begin(), indices.end());
Expand Down

0 comments on commit 09a8a47

Please sign in to comment.