예제 #1
0
void ScriptItem::setOSArgument(const ruleset::OSArgument& arg)
{
  m_scriptInfo.arguments[arg.name()] = arg;
  m_scriptInfo.argsChanged = true;
  emit argChanged();
}
예제 #2
0
void assertEqual(const ruleset::OSArgument &t_lhs, const ruleset::OSArgument &t_rhs)
{
  ASSERT_EQ(t_lhs.uuid(), t_rhs.uuid());
  ASSERT_EQ(t_lhs.versionUUID(), t_rhs.versionUUID());
  ASSERT_EQ(t_lhs.name(), t_rhs.name());
  ASSERT_EQ(t_lhs.displayName(), t_rhs.displayName());
  ASSERT_EQ(t_lhs.type(), t_rhs.type());
  ASSERT_EQ(t_lhs.required(), t_rhs.required());
  ASSERT_EQ(t_lhs.isRead(), t_rhs.isRead());
  ASSERT_EQ(t_lhs.extension(), t_rhs.extension());
  ASSERT_EQ(t_lhs.choiceValues(), t_rhs.choiceValues());
  ASSERT_EQ(t_lhs.choiceValueDisplayNames(), t_rhs.choiceValueDisplayNames());
  ASSERT_EQ(t_lhs.hasValue(), t_rhs.hasValue());
  ASSERT_EQ(t_lhs.hasDefaultValue(), t_rhs.hasDefaultValue());
  ASSERT_EQ(t_lhs.hasValue(), t_rhs.hasValue());
  ASSERT_EQ(t_lhs.hasDefaultValue(), t_rhs.hasDefaultValue());
  ASSERT_EQ(t_lhs.valueAsQVariant(), t_rhs.valueAsQVariant());
  ASSERT_EQ(t_lhs.defaultValueAsQVariant(), t_rhs.defaultValueAsQVariant());
  ASSERT_EQ(t_lhs.domainType(), t_rhs.domainType());
  ASSERT_EQ(t_lhs.hasDomain(), t_rhs.hasDomain());
  if (t_lhs.hasDomain()) {
    ASSERT_EQ(t_lhs.domainAsString(), t_rhs.domainAsString());
  }
}