File tree Expand file tree Collapse file tree 5 files changed +51
-6
lines changed
integration-tests/regression Expand file tree Collapse file tree 5 files changed +51
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace llvm2graphml {
77
88class Properties {
99public:
10- void setStringProperty (const std::string &key, std::string value);
10+ void setStringProperty (const std::string &key, const std::string & value);
1111 void setBooleanProperty (const std::string &key, bool value);
1212 void setLongProperty (const std::string &key, uint64_t value);
1313
Original file line number Diff line number Diff line change 33
44using namespace llvm2graphml ;
55
6- void Properties::setStringProperty (const std::string& key, std::string value) {
7- strings[key] = std::move (value);
6+ static std::string dropUnsupportedXmlChars (const std::string &input) {
7+ std::string output;
8+ output.reserve (input.size ());
9+ for (char c : input) {
10+ if (iscntrl (c) && (c != 0x9 ) && (c != 0xa ) && (c != 0xd )) {
11+ continue ;
12+ }
13+ output.push_back (c);
14+ }
15+
16+ return output;
17+ }
18+
19+ void Properties::setStringProperty (const std::string &key, const std::string &value) {
20+ strings[key] = dropUnsupportedXmlChars (value);
821}
922
1023void Properties::setBooleanProperty (const std::string &key, bool value) {
Original file line number Diff line number Diff line change 77 include (ExternalProject)
88
99 ExternalProject_Add(gremlin
10- URL http ://mirror.funkfreundelandshut.de/apache/ tinkerpop/3.4.5 /apache-tinkerpop-gremlin-console-3.4.5 -bin.zip
11- URL_HASH MD5=1ad2e9b2414846aed32213e1b7b331eb
10+ URL https ://downloads.apache.org/ tinkerpop/3.4.6 /apache-tinkerpop-gremlin-console-3.4.6 -bin.zip
11+ URL_HASH MD5=e810f5cc9890a23bdf5f4aca1b4f0471
1212 CONFIGURE_COMMAND ""
1313 BUILD_COMMAND ""
1414 INSTALL_COMMAND ""
@@ -26,7 +26,7 @@ set(LIT_COMMAND
2626 GREMLIN_CONSOLE_EXEC=${GREMLIN_CONSOLE_EXEC}
2727 FILECHECK_EXEC=${FILECHECK_EXEC}
2828 ${LIT_EXEC}
29- -vv -j2
29+ -vv
3030 ${CMAKE_CURRENT_LIST_DIR} /integration-tests
3131 )
3232
Original file line number Diff line number Diff line change 1+ %0 = type opaque
2+
3+ define internal i32 @"\01 -[Shape square]" (%0 *, i8* ) {
4+ %3 = alloca %0 *, align 8
5+ %4 = alloca i8* , align 8
6+ store %0 * %0 , %0 ** %3 , align 8
7+ store i8* %1 , i8** %4 , align 8
8+ ret i32 42
9+ }
Original file line number Diff line number Diff line change 1+ /**
2+ ; RUN: cd %p
3+ ; RUN: %LLVM2GRAPHML_EXEC --output=%t.xml main.ll
4+ ; RUN: %GREMLIN_CONSOLE_EXEC -e %s %t.xml | %FILECHECK_EXEC %s --match-full-lines
5+ */
6+
7+ // / Prepare
8+
9+ graph = TinkerGraph . open()
10+ g = graph. traversal()
11+ g. io(args[0 ]). read(). iterate()
12+
13+ def dump (tr ) {
14+ tr. unfold(). sideEffect{println it}. iterate()
15+ }
16+
17+ // / Assertions
18+
19+ dump(g. V(). has(' function' , ' name' , ' -[Shape square]' ). valueMap(' name' ))
20+ // CHECK: name=[-[Shape square]]
21+
22+ :exit
23+ // CHECK-EMPTY:
You can’t perform that action at this time.
0 commit comments