function test_sort

x = sdpvar(2,1);

assign(x,1);
sol = solvesdp(set(x > 0.1),-entropy(x),sdpsettings('usex0',1));

mbg_asserttrue(sol.problem == 0);
mbg_asserttolequal(double(sum(x)),0.73567246610151,1e-4);

x1 = sdpvar(1,1);
y = sdpvar(1,1);
x2 = sdpvar(1,1);
x = [x1;x2];

assign(x,1);
sol = solvesdp(set([x;y] > 0.1),-entropy(x)+y,sdpsettings('usex0',1));

mbg_asserttrue(sol.problem == 0);
mbg_asserttolequal(double(sum(x)),0.73567246610151,1e-4);
