FPEvalDataset/LeetCodeProblem
0304
1 2module Main where3import Test.HUnit4 5--Program start6maximumTripletValue :: [Int] -> Int7maximumTripletValue nums = undefined8 9--Program end10 11-- Test cases12 13test1 :: Test14test1 = TestCase (assertEqual "for (maximumTripletValue [12,6,1,2,7])," 77 (maximumTripletValue [12,6,1,2,7]))15 16test2 :: Test17test2 = TestCase (assertEqual "for (maximumTripletValue [1,10,3,4,19])," 133 (maximumTripletValue [1,10,3,4,19]))18 19test3 :: Test20test3 = TestCase (assertEqual "for (maximumTripletValue [1,2,3])," 0 (maximumTripletValue [1,2,3]))21 22test4 :: Test23test4 = TestCase (assertEqual "for (maximumTripletValue [716799, 394368, 463381, 112838, 809276, 534608, 753433, 558522, 788309, 257919, 983724, 535545, 140467, 834724, 443738, 165316, 441518, 565731, 312911, 360720, 8323, 694834, 597449, 191644, 233924, 304218, 89623, 358243])," 703886856068 (maximumTripletValue [716799, 394368, 463381, 112838, 809276, 534608, 753433, 558522, 788309, 257919, 983724, 535545, 140467, 834724, 443738, 165316, 441518, 565731, 312911, 360720, 8323, 694834, 597449, 191644, 233924, 304218, 89623, 358243]))24 25test5 :: Test26test5 = TestCase (assertEqual "for (maximumTripletValue [816954, 956418, 754073, 170418, 801656, 346171, 223826, 332092, 284452, 713745, 575365, 634095, 471765, 272335, 151511, 68655, 513002, 48833, 705000, 921354, 446828, 272339, 747162, 410611, 22834, 207870, 155139, 578089, 725394, 952872, 321836, 410262, 146309, 844879, 81858, 340777, 1735, 631323, 925339, 737604, 392472, 597657, 202375])," 889586053248 (maximumTripletValue [816954, 956418, 754073, 170418, 801656, 346171, 223826, 332092, 284452, 713745, 575365, 634095, 471765, 272335, 151511, 68655, 513002, 48833, 705000, 921354, 446828, 272339, 747162, 410611, 22834, 207870, 155139, 578089, 725394, 952872, 321836, 410262, 146309, 844879, 81858, 340777, 1735, 631323, 925339, 737604, 392472, 597657, 202375]))27 28test6 :: Test29test6 = TestCase (assertEqual "for (maximumTripletValue [610138, 983041, 793156, 484067, 343408, 526626, 369039, 809128, 204874, 965585, 113583, 960041, 386545, 18639, 274656, 859910, 204475, 281721, 54254, 261919, 39061, 242352, 140202, 496056, 778180, 236416, 410101, 609445, 645990, 891176, 281095, 66945, 279512, 83024, 693309, 885201, 9304, 860170, 118952, 245526, 815204, 375498, 806487, 567461, 610149, 493126, 294919, 815993, 797578, 470888, 41414, 459291, 866105, 747947, 562644, 385510, 149987, 319247, 603599, 572482, 543675, 55418, 120319, 732145, 377810, 782492, 469685])," 859451916752 (maximumTripletValue [610138, 983041, 793156, 484067, 343408, 526626, 369039, 809128, 204874, 965585, 113583, 960041, 386545, 18639, 274656, 859910, 204475, 281721, 54254, 261919, 39061, 242352, 140202, 496056, 778180, 236416, 410101, 609445, 645990, 891176, 281095, 66945, 279512, 83024, 693309, 885201, 9304, 860170, 118952, 245526, 815204, 375498, 806487, 567461, 610149, 493126, 294919, 815993, 797578, 470888, 41414, 459291, 866105, 747947, 562644, 385510, 149987, 319247, 603599, 572482, 543675, 55418, 120319, 732145, 377810, 782492, 469685]))30 31test7 :: Test32test7 = TestCase (assertEqual "for (maximumTripletValue [112774, 480706, 314193, 874993, 78576, 889670, 265715, 897003, 785401, 336999, 391084, 710406, 978927, 952230, 71519, 815260])," 779634104559 (maximumTripletValue [112774, 480706, 314193, 874993, 78576, 889670, 265715, 897003, 785401, 336999, 391084, 710406, 978927, 952230, 71519, 815260]))33 34test8 :: Test35test8 = TestCase (assertEqual "for (maximumTripletValue [616516, 685863, 579443, 242768, 92176, 725624, 129583, 826288, 156183, 330334, 286067, 289925, 633929, 933730, 73490, 244505, 275686, 90554, 660545, 598250, 500836, 135771, 111743, 503226])," 625697141650 (maximumTripletValue [616516, 685863, 579443, 242768, 92176, 725624, 129583, 826288, 156183, 330334, 286067, 289925, 633929, 933730, 73490, 244505, 275686, 90554, 660545, 598250, 500836, 135771, 111743, 503226]))36 37 38-- Grouping test cases39tests :: Test40tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7]41 42-- Running the tests43main :: IO Counts44main = runTestTT tests45 