Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.73 KB | None | 0 0
  1. *** Settings ***
  2.  
  3. #Library  Selenium2Library
  4. #Library  TestingBot
  5. Library  TestLibrary.py
  6.  
  7. #Test Setup  Open test browser
  8. #Test Teardown  Close test browser
  9.  
  10. *** Variables ***
  11.  
  12. ${CREDENTIALS}  key:secret
  13.  
  14. *** Test Cases ***
  15.  
  16.  
  17. NormalRange
  18.    Test Hex2Float
  19. Boundaries
  20.     Test To Boundaries
  21. Stress
  22.     Test Stress
  23.  
  24. *** Keywords ***
  25.  
  26. Test Hex2Float
  27.     ${output} =  Test Normal Range  3ffd4f8b
  28.     Should Be true  ${output} == 1.97898995876312255859375
  29.     ${output} =  Test Normal Range  459c4000
  30.     Should Be true  ${output} == 5000
  31.     ${output} =  Test Normal Range  478884af
  32.     Should Be true  ${output} == 69897.3671875
  33.     ${output} =  Test Normal Range  80000000
  34.     Should Be true  ${output} == -0
  35.     ${output} =  Test Normal Range  00000000
  36.     Should Be true  ${output} == 0
  37.     ${output} =  Test Normal Range  007fffff #underflow
  38.     Should Be true  ${output} == 1.1754942E-38
  39.     ${output} =  Test Normal Range  3dcccccd #rounding errors
  40.     Should Be true  ${output} == 0.100000001490116119384765625
  41.    
  42.     ${output} =  Test Division  43fc0000,3f800000
  43.     Should Be true  ${output} == 43fc0000
  44.     ${output} =  Test Division  43fc0000,00000000
  45.     Should Be true  ${output} == "Infinity"
  46.     ${output} =  Test Division  43fc0000,80000000
  47.     Should Be true  ${output} == "Infinity"
  48.    
  49. Test To Boundaries
  50.     ${output} =  Test Boundaries  ff800000
  51.     Should Be true  ${output} == "-Infinity"
  52.     ${output} =  Test Boundaries  7f800000
  53.     Should Be true  ${output} == "Infinity"
  54.     ${output} =  Test Boundaries  ffffffff
  55.     Should Be true  ${output} == "NaN"
  56.  
  57. Test Stress
  58.     ${output} =  Test Normal Range  3ffd4f8b3ffd4f8b
  59.     Should Be true  ${output} == "Value out of range"
  60.     ${output} =  Test Normal Range  459c4000459c4000
  61.     Should Be true  ${output} == "Value out of range"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement