Skip to content

Commit

Permalink
Adding tests, moved deprecated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Feb 18, 2019
1 parent b9ef32d commit 5ace964
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 51 deletions.
45 changes: 30 additions & 15 deletions include/CLI/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ class App {
}
#endif

/// Add set of options (No default, temp reference, such as an inline set)
/// Add set of options (No default, temp reference, such as an inline set) DEPRECATED
template <typename T>
Option *add_set(std::string option_name,
T &member, ///< The selected member of the set
Expand All @@ -656,7 +656,7 @@ class App {
return opt;
}

/// Add set of options (No default, set can be changed afterwords - do not destroy the set)
/// Add set of options (No default, set can be changed afterwords - do not destroy the set) DEPRECATED
template <typename T>
Option *add_mutable_set(std::string option_name,
T &member, ///< The selected member of the set
Expand All @@ -668,7 +668,7 @@ class App {
return opt;
}

/// Add set of options (with default, static set, such as an inline set)
/// Add set of options (with default, static set, such as an inline set) DEPRECATED
template <typename T>
Option *add_set(std::string option_name,
T &member, ///< The selected member of the set
Expand All @@ -681,7 +681,7 @@ class App {
return opt;
}

/// Add set of options (with default, set can be changed afterwards - do not destroy the set)
/// Add set of options (with default, set can be changed afterwards - do not destroy the set) DEPRECATED
template <typename T>
Option *add_mutable_set(std::string option_name,
T &member, ///< The selected member of the set
Expand All @@ -694,7 +694,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore case (no default, static set)
/// Add set of options, string only, ignore case (no default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_case)) instead")
Option *add_set_ignore_case(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -706,7 +707,8 @@ class App {
}

/// Add set of options, string only, ignore case (no default, set can be changed afterwards - do not destroy the
/// set)
/// set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_case)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_case(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand All @@ -717,7 +719,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore case (default, static set)
/// Add set of options, string only, ignore case (default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_case)) instead")
Option *add_set_ignore_case(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -730,6 +733,8 @@ class App {
}

/// Add set of options, string only, ignore case (default, set can be changed afterwards - do not destroy the set)
/// DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(...)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_case(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand All @@ -741,7 +746,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore underscore (no default, static set)
/// Add set of options, string only, ignore underscore (no default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_underscore)) instead")
Option *add_set_ignore_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -753,7 +759,8 @@ class App {
}

/// Add set of options, string only, ignore underscore (no default, set can be changed afterwards - do not destroy
/// the set)
/// the set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_underscore)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand All @@ -764,7 +771,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore underscore (default, static set)
/// Add set of options, string only, ignore underscore (default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_underscore)) instead")
Option *add_set_ignore_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -777,7 +785,8 @@ class App {
}

/// Add set of options, string only, ignore underscore (default, set can be changed afterwards - do not destroy the
/// set)
/// set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_underscore)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand All @@ -789,7 +798,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore underscore and case (no default, static set)
/// Add set of options, string only, ignore underscore and case (no default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) instead")
Option *add_set_ignore_case_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -801,7 +811,9 @@ class App {
}

/// Add set of options, string only, ignore underscore and case (no default, set can be changed afterwards - do not
/// destroy the set)
/// destroy the set) DEPRECATED
CLI11_DEPRECATED(
"Use ->check(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_case_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand All @@ -812,7 +824,8 @@ class App {
return opt;
}

/// Add set of options, string only, ignore underscore and case (default, static set)
/// Add set of options, string only, ignore underscore and case (default, static set) DEPRECATED
CLI11_DEPRECATED("Use ->check(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) instead")
Option *add_set_ignore_case_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
std::set<std::string> options, ///< The set of possibilities
Expand All @@ -825,7 +838,9 @@ class App {
}

/// Add set of options, string only, ignore underscore and case (default, set can be changed afterwards - do not
/// destroy the set)
/// destroy the set) DEPRECATED
CLI11_DEPRECATED(
"Use ->check(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a (shared) pointer instead")
Option *add_mutable_set_ignore_case_underscore(std::string option_name,
std::string &member, ///< The selected member of the set
const std::set<std::string> &options, ///< The set of possibilities
Expand Down
Loading

0 comments on commit 5ace964

Please sign in to comment.