Show
Ignore:
Timestamp:
10/26/08 00:07:42 (5 years ago)
Author:
bjourne
Message:

Fix three tests that were failing because of the bug fix in r568. The
minimal zoom factor is now 0.02, and it should never be possible to
set a lower zoom factor.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gtkimageview/tests/test-fitting.c

    r288 r578  
    144144 
    145145            gdouble expected_zoom = MIN (width_ratio, height_ratio); 
    146                         expected_zoom = MIN (expected_zoom, 1.0); 
     146            expected_zoom = CLAMP (expected_zoom, 
     147                                   gtk_zooms_get_min_zoom (), 
     148                                   1.0); 
    147149 
    148150                        gdouble real_zoom = gtk_image_view_get_zoom (view); 
  • gtkimageview/tests/test-size-allocation.c

    r525 r578  
    5555 
    5656            gdouble expected_zoom = MIN (width_ratio, height_ratio); 
    57                         expected_zoom = MIN (expected_zoom, 1.0); 
     57                        expected_zoom = CLAMP (expected_zoom, 
     58                                   gtk_zooms_get_min_zoom (), 
     59                                   1.0); 
    5860             
    5961            assert (gtk_image_view_get_zoom (view) == expected_zoom); 
  • gtkimageview/tests/test-zoom-in-out.c

    r525 r578  
    7979    printf ("test_boundary_zoom_values\n"); 
    8080    setup (); 
    81     gdouble small_zooms[] = {-99.0, -12324.0, 0.0, 0.001, 0.049, 0.009}; 
     81    gdouble small_zooms[] = {-99.0, -12324.0, 0.0, 0.001, 0.019, 0.009}; 
    8282    for (int n = 0; n < G_N_ELEMENTS(small_zooms); n++) 
    8383    { 
     
    124124 
    125125    gtk_image_view_set_zoom (view, 1.0); 
    126     gdouble zoom_outs[] = {0.75, 0.5, 0.3, 0.2, 0.15, 0.10, 0.07, 0.05}; 
     126    gdouble zoom_outs[] = { 
     127        0.75, 0.5, 0.3, 0.2, 0.15, 0.10, 0.07, 0.05, 0.02 
     128    }; 
    127129    for (int n = 0; n < G_N_ELEMENTS(zoom_outs); n++) 
    128130    {