using Test
include("module-3-exercise-4.jl")

@testset "$(get_module_3_excersise_4_author_name()): problem 4 tests" begin
    @test get_module_3_excersise_4_author_name() != "YOUR NAME HERE"
    @test problem_4(3) == ([0.9999999999999997, 1.9999999999999978, 2.0000000000000036, 3.9999999999999982, 4.0, 4.999999999999997], [-0.40824829046386313 -0.2886751345948132 0.5000000000000001 0.28867513459481314 0.4999999999999999 -0.40824829046386263; 0.40824829046386246 -0.28867513459481337 -0.5000000000000004 -0.2886751345948126 0.49999999999999967 -0.40824829046386346; -0.4082482904638625 0.5773502691896258 3.88578058618805e-16 -0.5773502691896252 -4.996003610813204e-16 -0.4082482904638641; 0.4082482904638628 -0.2886751345948139 0.4999999999999996 -0.28867513459481203 -0.5000000000000006 -0.408248290463863; -0.4082482904638637 -0.2886751345948127 -0.5000000000000001 0.28867513459481364 -0.49999999999999983 -0.4082482904638618; 0.4082482904638635 0.5773502691896248 0.0 0.5773502691896264 0.0 -0.4082482904638631])
    @test problem_4(10) == ([8.000000000000004, 9.0, 9.000000000000005, 11.0, 11.000000000000002, 11.999999999999998], [0.40824829046386224 -0.2886751345948138 0.49999999999999944 0.5000000000000004 0.2886751345948123 -0.4082482904638637; -0.40824829046386124 -0.288675134594812 -0.5000000000000021 0.4999999999999977 -0.28867513459481375 -0.40824829046386424; 0.4082482904638627 0.5773502691896262 2.1649348980190608e-15 -2.2759572004815654e-15 -0.5773502691896251 -0.4082482904638638; -0.408248290463863 -0.2886751345948146 0.49999999999999895 -0.500000000000001 -0.2886751345948111 -0.40824829046386235; 0.4082482904638647 -0.28867513459481187 -0.49999999999999944 -0.5000000000000004 0.28867513459481414 -0.4082482904638609; -0.408248290463864 0.5773502691896247 0.0 0.0 0.5773502691896264 -0.408248290463863])
end