Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 2.0 #85

Merged
merged 5 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ci:
runs-on: ubuntu-22.04
container:
image: chapel/chapel
image: chapel/chapel:2.0.0

steps:
- name: Checkout repository
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/gigasecond/.meta/reference.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module Gigasecond {
// implement reference solution
use Time;

const gigasecond = new timedelta(seconds=1000000000);
const gigasecond = new timeDelta(seconds=1000000000);

proc addGigasecond(moment: datetime) {
proc addGigasecond(moment: dateTime) {
return moment + gigasecond;
}
}
8 changes: 4 additions & 4 deletions exercises/practice/gigasecond/test/tests.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ use Time;
use Gigasecond;

proc testFullTimeSpecified(test : borrowed Test) throws {
var input = new datetime(2015, 01, 24, hour=22, minute=00, second=00),
expected = new datetime(2046, 10, 02, hour=23, minute=46, second=40);
var input = new dateTime(2015, 01, 24, hour=22, minute=00, second=00),
expected = new dateTime(2046, 10, 02, hour=23, minute=46, second=40);
test.assertEqual(addGigasecond(input), expected);
}

proc testFullTimeWithDayRollOver(test : borrowed Test) throws {
var input = new datetime(2015, 01, 24, hour=23, minute=59, second=59),
expected = new datetime(2046, 10, 03, hour=01, minute=46, second=39);
var input = new dateTime(2015, 01, 24, hour=23, minute=59, second=59),
expected = new dateTime(2046, 10, 03, hour=01, minute=46, second=39);
test.assertEqual(addGigasecond(input), expected);
}

Expand Down
Loading