TestCodec_ExternalFunctions.ttcn 1.16 KB
Newer Older
module TestCodec_ExternalFunctions {

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_DataStrings all;

  // LibItsCommon
  import from LibItsCommon_Functions all;
  
  // TestCodec
  import from TestCodec_TestAndSystem all;

  testcase tc_f_getCurrentTime() runs on TCType system TCType {
    var integer v_timeStamp := 0;
    v_timeStamp := fx_getCurrentTime();
    log("v_timeStamp= ", v_timeStamp);
  }

  testcase tc_f_computePositionUsingDistance() runs on TCType system TCType {
    var Int32 v_latitude;
    var Int32 v_longitude;
    
    fx_computePositionUsingDistance(
            300000000, 
            400000000, 
            8.0, 
            300,
            v_latitude,
            v_longitude
        );
    log("v_latitude= ", v_latitude);
    log("v_longitude= ", v_longitude);
    if (v_latitude != 300000359) {
      setverdict(fail, "Wrong expected latitude");
    } else if (v_longitude != 399999281) {
      setverdict(fail, "Wrong expected longitude");
    } else {
      setverdict(pass);
    }
  }

  control {
    execute(tc_f_computePositionUsingDistance());
  }
  
} // End of module TestCodec_ExternalFunctions