+ negative_stable = all([eig < options.ABS_TOL for eig in eigs])
+ self.assertTrue(negative_stable)
+
+ # The dual game's value should always equal the primal's.
+ dualsoln = game.dual().solution()
+ self.assert_within_tol(dualsoln.game_value(), soln.game_value())
+
+
+ def test_lyapunov_orthant(self):
+ """
+ Test that a Lyapunov game on the nonnegative orthant works.
+ """
+ (K, e1, e2) = _random_orthant_params()[1:]
+ L = _random_diagonal_matrix(K.dimension())
+
+ self.assert_lyapunov_works(L, K, e1, e2)
+
+
+ def test_lyapunov_icecream(self):
+ """
+ Test that a Lyapunov game on the ice-cream cone works.
+ """
+ (K, e1, e2) = _random_icecream_params()[1:]
+ L = _random_lyapunov_like_icecream(K.dimension())
+
+ self.assert_lyapunov_works(L, K, e1, e2)