Sha256: 4ce3b1d629bf8b4830061125e752e65f3d44c304cfb1f23cfad88a5096412d2f

Contents?: true

Size: 620 Bytes

Versions: 29

Compression:

Stored size: 620 Bytes

Contents

$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.tests\.', '.'
. "$here\$sut"

Describe "LeapYear Tests" {
    It "Year not divisible by 4: common year" {
        Test-LeapYear(2015) | Should be $false
    }

    It "Year divisible by 4, not divisible by 100: leap year" {
        Test-LeapYear(1996) | Should be $true
    }

    It "Year divisible by 100, not divisible by 400: common year" {
        Test-LeapYear(2100) | Should be $false
    }

    It "Year divisible by 400: leap year" {
        Test-LeapYear(2000) | Should be $true
    }
}

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.179 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.178 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.177 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.176 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.175 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.174 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.173 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.172 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.171 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.170 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.169 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.167 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.166 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.165 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.164 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.163 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.162 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.161 tracks/powershell/exercises/leap/LeapYear.tests.ps1
trackler-2.2.1.160 tracks/powershell/exercises/leap/LeapYear.tests.ps1