Skip to content

Compare values in XPath Expression with „<” or „>” does not work #180

@rainman110

Description

@rainman110
TEST_F(TxUtilsTest, test_tixiXpath_by_attribute_relations) {
  TixiDocumentHandle h = -1;
  ASSERT_EQ(SUCCESS, tixiCreateDocument("root", &h));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[1]", "attr", "a"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[2]", "attr", "b"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[3]", "attr", "c"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[4]", "attr", "d"));

  char *xPath;
  // This doesn't work with Tixi 3.1.1
  ASSERT_EQ(SUCCESS,
            tixiXPathExpressionGetXPath(h, "//child[@attr>\"b\"]", 1, &xPath));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions