import 'package:flutter_test/flutter_test.dart';
import 'package:klt51_unified/services/lambda_engine.dart';
import 'package:klt51_unified/models/klt_models.dart';

void main() {
  test('lambda formula returns stable result', () {
    final result = LambdaEngine.lambdaTruth(const Reper4(u: 0.9, i: 0.6, r: 0.4, d: 0.7));
    expect(result.status, 'ok');
    expect(result.lambda, isNotNull);
    expect(result.delta, isNotNull);
    expect(result.auth, isNotNull);
  });

  test('dStar is calculable for nonsingular triple', () {
    final d = LambdaEngine.dStar(0.9, 0.6, 0.4);
    expect(d, isNotNull);
  });
}
