- RulerPtr fixedRuler = new FixedRuler( 100.0f );
- fixedRuler->SetDomain( RulerDomain(0.0f, 400.0f, true) );
-
- DALI_TEST_EQUALS( fixedRuler->Snap(-30.0f, 0.0f), -100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-70.0f, 0.0f), -100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-120.0f, 0.0f), -200.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-480.0f, 0.0f), -500.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(20.0f, 0.0f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(50.0f, 0.0f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(80.0f, 0.0f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(100.0f, 0.0f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(120.0f, 0.0f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(250.0f, 0.0f), 200.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(620.0f, 0.0f), 600.0f, TEST_LOCATION);
-
- DALI_TEST_EQUALS( fixedRuler->Snap(-30.0f, 0.5f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-70.0f, 0.5f), -100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-120.0f, 0.5f), -100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-480.0f, 0.5f), -500.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(20.0f, 0.5f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(50.0f, 0.5f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(80.0f, 0.5f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(100.0f, 0.5f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(120.0f, 0.5f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(250.0f, 0.5f), 300.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(620.0f, 0.5f), 600.0f, TEST_LOCATION);
-
- DALI_TEST_EQUALS( fixedRuler->Snap(-30.0f, 1.0f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-70.0f, 1.0f), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-120.0f, 1.0f), -100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(-480.0f, 1.0f), -400.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(20.0f, 1.0f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(50.0f, 1.0f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(80.0f, 1.0f), 100.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(100.0f, 1.0f), 200.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(120.0f, 1.0f), 200.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(250.0f, 1.0f), 300.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( fixedRuler->Snap(620.0f, 1.0f), 700.0f, TEST_LOCATION);
+ RulerPtr fixedRuler = new FixedRuler(100.0f);
+ fixedRuler->SetDomain(RulerDomain(0.0f, 400.0f, true));
+
+ DALI_TEST_EQUALS(fixedRuler->Snap(-30.0f, 0.0f), -100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-70.0f, 0.0f), -100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-120.0f, 0.0f), -200.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-480.0f, 0.0f), -500.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(20.0f, 0.0f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(50.0f, 0.0f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(80.0f, 0.0f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(100.0f, 0.0f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(120.0f, 0.0f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(250.0f, 0.0f), 200.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(620.0f, 0.0f), 600.0f, TEST_LOCATION);
+
+ DALI_TEST_EQUALS(fixedRuler->Snap(-30.0f, 0.5f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-70.0f, 0.5f), -100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-120.0f, 0.5f), -100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-480.0f, 0.5f), -500.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(20.0f, 0.5f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(50.0f, 0.5f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(80.0f, 0.5f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(100.0f, 0.5f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(120.0f, 0.5f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(250.0f, 0.5f), 300.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(620.0f, 0.5f), 600.0f, TEST_LOCATION);
+
+ DALI_TEST_EQUALS(fixedRuler->Snap(-30.0f, 1.0f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-70.0f, 1.0f), 0.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-120.0f, 1.0f), -100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(-480.0f, 1.0f), -400.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(20.0f, 1.0f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(50.0f, 1.0f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(80.0f, 1.0f), 100.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(100.0f, 1.0f), 200.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(120.0f, 1.0f), 200.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(250.0f, 1.0f), 300.0f, TEST_LOCATION);
+ DALI_TEST_EQUALS(fixedRuler->Snap(620.0f, 1.0f), 700.0f, TEST_LOCATION);