"""Test that C++ bindings are available and working."""

import pytest
import gconcord


def test_cpp_available():
    """Test that C++ bindings are available."""
    assert gconcord._cpp_available, "C++ bindings must be available"


def test_cpp_classes_exist():
    """Test that C++ classes can be imported."""
    assert hasattr(gconcord, 'ConcordSolver')
    assert hasattr(gconcord, 'ConcordOptions')
    assert hasattr(gconcord, 'ConcordResult')
    assert hasattr(gconcord, 'Algorithm')


def test_cpp_solver_instantiation():
    """Test that we can create a ConcordSolver instance."""
    solver = gconcord.ConcordSolver()
    assert solver is not None


def test_algorithm_enum():
    """Test that Algorithm enum values exist."""
    assert hasattr(gconcord.Algorithm, 'AUTO')
    assert hasattr(gconcord.Algorithm, 'COORDINATE_DESCENT')
    assert hasattr(gconcord.Algorithm, 'COORDINATE_HIGH_DIM')
    assert hasattr(gconcord.Algorithm, 'COORDINATE_BLAS')
    assert hasattr(gconcord.Algorithm, 'ISTA')
    assert hasattr(gconcord.Algorithm, 'SYMLASSO')
    assert hasattr(gconcord.Algorithm, 'SYMLASSO_ITERATES')