~rosivaldo-fa/set-theory/incremental

« back to all changes in this revision

Viewing changes to src/st_tests/tests/numbers_tests/sets/integer_universe_tests.e

  • Committer: rosivaldo.fa
  • Date: 2022-06-28 15:34:46 UTC
  • Revision ID: rosivaldo.fa@gmail.com-20220628153446-50eafs1ho1bo7ifo
{STI_SET}.others

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
                        test_conjunction,
229
229
                        test_sets_plus_same_sets_with_element,
230
230
                        universe_to_be_tested,
 
231
                        set_to_be_tested_with_cardinality,
231
232
                        set_from_sa,
232
233
                        set_from_saa,
233
234
                        set_from_sti_sa,
2648
2649
                        class
2649
2650
                end
2650
2651
 
 
2652
        set_to_be_tested_with_cardinality (n: NATURAL): like new_integer_set
 
2653
                        -- <Precursor>
 
2654
                do
 
2655
                        from
 
2656
                                from
 
2657
                                        Result := new_integer_set
 
2658
                                until
 
2659
                                        # Result ≥ n
 
2660
                                loop
 
2661
                                        Result := new_integer_set
 
2662
                                end
 
2663
                        invariant
 
2664
                                at_least_n: # Result ≥ n
 
2665
                        until
 
2666
                                # Result = n
 
2667
                        loop
 
2668
                                Result := Result.others
 
2669
                        variant
 
2670
                                down_to_n: {like new_set_a}.natural_as_integer (# Result - n)
 
2671
                        end
 
2672
                end
 
2673
 
2651
2674
feature {NONE} -- Conversion
2652
2675
 
2653
2676
        set_from_sa (sa: STS_SET [STS_INTEGER_NUMBER, STS_INTEGER_EQUALITY]): like some_direct_integer_set