initial commit of Gregorian/IFC date conversion tools and unit tests

This commit is contained in:
2025-02-16 21:12:54 -08:00
parent 08f09ce109
commit 95985ef032
8 changed files with 339 additions and 0 deletions

35
test_isLeap.m Normal file
View File

@@ -0,0 +1,35 @@
classdef test_isLeap < matlab.unittest.TestCase
methods(TestClassSetup)
% Shared setup for the entire test class
end
methods(TestMethodSetup)
% Setup for each test
end
methods(Test)
% Test methods
function test_basic_2001(testCase)
testCase.verifyFalse(isLeap(2001));
end
function test_basic_1996(testCase)
testCase.verifyTrue(isLeap(1996));
end
function test_exception1_2100(testCase)
testCase.verifyFalse(isLeap(2100));
end
function test_exception2_2000(testCase)
testCase.verifyTrue(isLeap(2000));
end
function test_vectorized_all(testCase)
testCase.verifyEqual([true; false; false; false; true; false], isLeap([2000; 1999; 1998; 1997; 1996; 2100]));
end
end
end