@testset "Canonical" begin

    @testset "Optimal" begin

        A = [2 1; 1 2]
        b = [4, 4]
        c = [4, 3]
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [1.3333333333333335, 1.3333333333333333, 0.0, 0.0])
        @test isapprox(output.z, 9.333333333333334)
        @test output.termination_status == 1
        @test output.base == [1, 2]
        @test output.nbase == [3, 4]    
    end

    @testset "Unbound" begin
        A = [-2 1; 1 -1]
        b = [2, 2]
        c = [1, 1]
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [1.0, 1.0, 1.0, 0.0])
        @test isapprox(output.z, Inf)
        @test output.termination_status == 2
        @test output.base == [3, 1]
        @test output.nbase == [4, 2]    
    end

    @testset "10 variables" begin
        Random.seed!(123)
        A = rand(1:20,10,10)
        c = rand(1:10,10)
        b = rand(1:30,10)
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [0.021665538253215974, 0.0, 0.07752200406228843, 0.0, 0.0, 0.0, 0.0, 0.04570074475287744, 0.0, 0.0, 8.20514556533514, 6.321259309410968, 21.437711577522006, 19.794515910629656, 20.410291130670277, 0.0, 13.41198375084631, 0.0, 0.3706838185511172, 0.0])
        @test isapprox(output.z, 1.052132701421801)
        @test output.termination_status == 1
        @test output.base == [11, 12, 13, 14, 15, 8, 17, 1, 19, 3]
        @test output.nbase == [6, 2, 20, 4, 18, 5, 7, 16, 9, 10] 
    end

    @testset "100 variables" begin
        Random.seed!(123)
        A = rand(1:200,100,100)
        c = rand(1:10,100)
        b = rand(1:30,100)
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.005497498395887944, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.004566856299882416, 0.0, 0.0, 0.0034876174209097503, 0.0, 0.0, 0.0, 0.0, 0.0, -0.0009317676782381164, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01570455795057045, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 17.40184009409551, 9.05933662252928, 2.4542994260563264, 17.887884835159845, 13.397392259170859, 9.497814553143392, 6.627345442541626, 24.510258929360113, 2.3023649010590277, 17.66006648141052, 6.994701120611391, 21.028703812751868, 4.793191254800283, 15.975326321340914, 15.130598356793328, 6.877495170470716, 7.635531583782399, 14.082784291797406, 28.537004213026215, 1.4083399576531552, 0.621640090069343, 5.852332912027959, 4.407094245045586, 0.0, 15.56328896075071, 1.2900329328036855, 4.539929122243899, 16.554462942593233, 21.631972955912353, 10.721262510221951, 22.19213851528068, 24.03888250539417, 22.857064994868264, 15.790811698611146, 27.1573999252441, 15.127882386214093, 20.345108081507963, 11.74172961111829, 1.4040609247162312, 19.348874070921234, 0.3098945926466158, 0.5185442843180255, 19.125269632747475, 2.112958913675148, 13.723058512535461, 2.890858614109204, 1.1990316170939093, 3.708410919794461, 6.438440493149732, 9.350162823884915, 19.16521657760707, 23.4226279552358, 21.831087891692743, 5.49088378229085, 21.080597467637197, 20.054570534101273, 12.289641088070667, 22.092125462963345, 0.0, 2.404603452588636, 2.2766266207447607, 7.4193128055816215, 3.952940853610769, 26.867919347410837, 11.395965262366085, 17.735575814931213, 19.070638090576377, 21.20402949545797, 7.293782612475125, 20.49986144945302, 17.341505314609986, 5.035809923511386, 22.35329451250835, 13.096585037952156, 0.0, 16.04799246352496, 6.240022717228514, 5.468877370887461, 15.15083430400292, 0.0, 25.053640364028315, 28.77180679303822, 27.109831323288216, 27.094220203936434, 25.565645772847475, 18.540856592257754, 4.006456577225859, 21.67052590950605, 24.85558428213155, 11.978660346389486, 20.4855200520266, 16.62394413711698, 0.0, 10.101361626820168, 14.425391420934153, 20.494717093391312, 20.146004124590927, 1.061291729338838, 9.893427272040896, 23.90678197299795])
        @test isapprox(output.z, 0.2832476238901244)
        @test output.termination_status == 1
        @test output.base == [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 73, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 64, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 91, 176, 177, 178, 179, 37, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 67, 194, 195, 196, 197, 198, 199, 200]
        @test output.nbase == [2, 1, 7, 180, 193, 159, 124, 8, 9, 10, 6, 4, 13, 14, 15, 16, 17, 18, 19, 20, 21, 3, 5, 24, 11, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 23, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 22, 56, 57, 58, 59, 60, 61, 62, 63, 25, 65, 66, 12, 68, 69, 70, 71, 72, 55, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 175, 92, 93, 94, 95, 96, 97, 98, 99, 100]
    end

    @testset "Phase 1" begin
        A = [2 1; 1 2; -1 -1]
        b = [4, 4, -1]
        c = [4, 3]
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [1.3333333333333333, 1.3333333333333335, 0.0, 0.0, 1.6666666666666667])
        @test isapprox(output.z, 9.333333333333332)
        @test output.termination_status == 1
        @test output.base == [5, 2, 1]
        @test output.nbase == [4, 3]    
    end

    @testset "Infeasible" begin
        A = [2 1; 1 2; -1 -1]
        b = [4, 4, -5]
        c = [4, 3]
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test output.termination_status == 3
   
    end

    @testset "Cicle" begin
        using LinearOptimizationSolver
        A = [1 2; -3 1; 1 -1]
        b = [14, 0, 2]
        c = [3, 4]
        input = create(A, b, c, tol=1E-3,verbose=false,standard=false)
        output = solve(input)

        @test isapprox(output.x, [6.0, 4.0, 0.0, 14.0, 0.0])
        @test isapprox(output.z, 34.0)
        @test output.termination_status == 1
        @test output.base == [2, 4, 1]
        @test output.nbase == [5, 3]  
   
    end
end