コード例 #1
0
ファイル: TestWayPointFile.cpp プロジェクト: galippi/xcsoar
static void
TestWinPilot(wp_vector org_wp)
{
  Waypoints way_points;
  if (!TestWayPointFile(_T("test/data/waypoints.dat"), way_points,
                        org_wp.size())) {
    skip(10 * org_wp.size(), 0, "opening waypoint file failed");
    return;
  }

  wp_vector::iterator it;
  for (it = org_wp.begin(); it < org_wp.end(); it++) {
    const Waypoint *wp = GetWayPoint(*it, way_points);
    TestWinPilotWayPoint(*it, wp);
  }
}
コード例 #2
0
ファイル: TestWaypointReader.cpp プロジェクト: macsux/XCSoar
static void
TestOzi(wp_vector org_wp)
{
    Waypoints way_points;
    if (!TestWaypointFile(_T("test/data/waypoints_ozi.wpt"), way_points,
                          org_wp.size())) {
        skip(3 * org_wp.size(), 0, "opening waypoint file failed");
        return;
    }

    wp_vector::iterator it;
    for (it = org_wp.begin(); it < org_wp.end(); it++) {
        trim_inplace(it->name);
        GetWaypoint(*it, way_points);
    }
}
コード例 #3
0
ファイル: TestWaypointReader.cpp プロジェクト: macsux/XCSoar
static void
TestFS_UTM(wp_vector org_wp)
{
    Waypoints way_points;
    if (!TestWaypointFile(_T("test/data/waypoints_utm.wpt"), way_points,
                          org_wp.size())) {
        skip(3 * org_wp.size(), 0, "opening waypoint file failed");
        return;
    }

    wp_vector::iterator it;
    for (it = org_wp.begin(); it < org_wp.end(); it++) {
        if (it->name.length() > 8)
            it->name = it->name.erase(8);
        trim_inplace(it->name);
        GetWaypoint(*it, way_points);
    }
}
コード例 #4
0
ファイル: TestWayPointFile.cpp プロジェクト: galippi/xcsoar
static void
TestZander(wp_vector org_wp)
{
  Waypoints way_points;
  if (!TestWayPointFile(_T("test/data/waypoints.wpz"), way_points,
                        org_wp.size())) {
    skip(10 * org_wp.size(), 0, "opening waypoint file failed");
    return;
  }

  wp_vector::iterator it;
  for (it = org_wp.begin(); it < org_wp.end(); it++) {
    if (it->Name.length() > 12)
      it->Name = it->Name.erase(12);
    trim_inplace(it->Name);
    const Waypoint *wp = GetWayPoint(*it, way_points);
    TestZanderWayPoint(*it, wp);
  }
}
コード例 #5
0
static void
TestCompeGPS_UTM(wp_vector org_wp)
{
    Waypoints way_points;
    if (!TestWaypointFile(_T("test/data/waypoints_compe_utm.wpt"), way_points,
                          org_wp.size())) {
        skip(3 * org_wp.size(), 0, "opening waypoint file failed");
        return;
    }

    wp_vector::iterator it;
    for (it = org_wp.begin(); it < org_wp.end(); it++) {
        size_t pos;
        while ((pos = it->name.find_first_of(_T(' '))) != tstring::npos)
            it->name.erase(pos, 1);

        if (it->name.length() > 6)
            it->name = it->name.erase(6);

        trim_inplace(it->name);
        const Waypoint *wp = GetWaypoint(*it, way_points);
        ok1(wp->comment == it->comment);
    }
}