class TestCase::Module::Float {
  use Fn;
  
  static method basic : int () {
    # Initialization and value check
    {
      my $numeric_object = Float->new(Fn->FLT_MIN());
      unless ($numeric_object->value == Fn->FLT_MIN()) { return 0; }
    }
    
    # Mutable test
    {
      my $numeric_object = Float->new(1.0f);
      $numeric_object->set_value(10.0f);
      unless ($numeric_object->value == 10.0f) { return 0; }
    }

    # Clone test
    {
      my $numeric_object = Float->new(5.0f);
      my $cloned_object = $numeric_object->clone;
      unless ($cloned_object->value == 5.0f) { return 0; }
      $cloned_object->set_value(20.0f);
      if ($numeric_object->value == 20.0f) { return 0; }
    }

    # Read-only test
    {
      my $numeric_object = Float->new(1.0f);
      $numeric_object->make_read_only;
      eval { $numeric_object->set_value(10.0f); };
      unless (Fn->contains($@, "The object is read-only and its value cannot be changed.")) {
        return 0;
      }
    }
    
    return 1;
  }
}
