Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Jun 2, 2024
1 parent e8cab58 commit 7e45580
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/stim/diagram/graph/match_graph_svg_drawer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ void stim_draw_internal::dem_match_graph_to_svg_diagram_write_to(
svg_out << ">\n";

auto write_lines = [&](const std::vector<Coord<3>> &line_data, const char *color) {
if (line_data.empty()) {
return;
}
svg_out << "<path d=\"";
for (size_t k = 0; k < line_data.size(); k++) {
if (k) {
Expand Down
2 changes: 1 addition & 1 deletion testdata/match_graph_no_coords.gltf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"accessors":[{"bufferView":0,"byteOffset":0,"componentType":5126,"count":17,"max":[0,0.400000005960464,0.400000005960464],"min":[0,-0.400000005960464,-0.400000005960464],"name":"circle_loop","type":"VEC3"},{"bufferView":1,"byteOffset":0,"componentType":5126,"count":18,"max":[9,14.9442720413208,-1],"min":[-1.4721360206604,0,-1],"name":"buf_scattered_lines","type":"VEC3"},{"bufferView":2,"byteOffset":0,"componentType":5126,"count":2,"max":[0,0,-1],"min":[-8.32050228118896,-5.54700183868408,-1],"name":"buf_red_scattered_lines","type":"VEC3"}],"asset":{"version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":204,"byteOffset":0,"name":"circle_loop","target":34962},{"buffer":1,"byteLength":216,"byteOffset":0,"name":"buf_scattered_lines","target":34962},{"buffer":2,"byteLength":24,"byteOffset":0,"name":"buf_red_scattered_lines","target":34962}],"buffers":[{"byteLength":204,"name":"circle_loop","uri":"data:application/octet-stream;base64,AAAAAM3MzD4AAAAAAAAAAOU1vT5Fvxw+AAAAAMPQkD7D0JA+AAAAAES/HD7lNb0+AAAAAPIwlrLNzMw+AAAAAEe/HL7lNb0+AAAAAMPQkL7D0JA+AAAAAOc1vb5Avxw+AAAAAM3MzL7yMBazAAAAAOU1vb5Evxy+AAAAAMHQkL7E0JC+AAAAADy/HL7nNb2+AAAAAPLkozHNzMy+AAAAAEm/HD7kNb2+AAAAAMbQkD6/0JC+AAAAAOY1vT5Evxy+AAAAAM3MzD4AAAAA"},{"byteLength":216,"name":"buf_scattered_lines","uri":"data:application/octet-stream;base64,AAAAAAAAAAAAAIC/AABAQAAAAAAAAIC/AABAQAAAAAAAAIC/AAAAAAAAQEAAAIC/AAAAAAAAQEAAAIC/AAAAAAAAwEAAAIC/AAAAAAAAwEAAAIC/AABAQAAAQEAAAIC/AABAQAAAQEAAAIC/AADAQAAAAAAAAIC/AADAQAAAAAAAAIC/AAAQQQAAAAAAAIC/AAAQQQAAAAAAAIC/AADAQAAAQEAAAIC/AADAQAAAQEAAAIC/AABAQAAAwEAAAIC/AABAQAAAwEAAAIC/9G68v70bb0EAAIC/"},{"byteLength":24,"name":"buf_red_scattered_lines","uri":"data:application/octet-stream;base64,AAAAAAAAAAAAAIC/xyAFwQqBscAAAIC/"}],"materials":[{"doubleSided":true,"name":"black","pbrMetallicRoughness":{"baseColorFactor":[0,0,0,1],"metallicFactor":1,"roughnessFactor":1}},{"doubleSided":true,"name":"black","pbrMetallicRoughness":{"baseColorFactor":[0,0,0,1],"metallicFactor":1,"roughnessFactor":1}},{"doubleSided":true,"name":"red","pbrMetallicRoughness":{"baseColorFactor":[1,0,0,1],"metallicFactor":1,"roughnessFactor":1}}],"meshes":[{"primitives":[{"attributes":{"POSITION":0},"material":0,"mode":6}]},{"primitives":[{"attributes":{"POSITION":1},"material":1,"mode":1}]},{"primitives":[{"attributes":{"POSITION":2},"material":2,"mode":1}]}],"nodes":[{"mesh":0,"translation":[0,0,-1]},{"mesh":0,"translation":[3,0,-1]},{"mesh":0,"translation":[0,3,-1]},{"mesh":0,"translation":[0,6,-1]},{"mesh":0,"translation":[3,3,-1]},{"mesh":0,"translation":[6,0,-1]},{"mesh":0,"translation":[9,0,-1]},{"mesh":0,"translation":[6,3,-1]},{"mesh":0,"translation":[3,6,-1]},{"mesh":1,"translation":[0,0,0]},{"mesh":2,"translation":[0,0,0]}],"scene":0,"scenes":[{"nodes":[0,1,2,3,4,5,6,7,8,9,10]}]}
{"accessors":[{"bufferView":0,"byteOffset":0,"componentType":5126,"count":9,"max":[0,0.400000005960464,0.400000005960464],"min":[0,-0.400000005960464,-0.400000005960464],"name":"circle_loop","type":"VEC3"},{"bufferView":1,"byteOffset":0,"componentType":5126,"count":9,"max":[0.400000005960464,0,0.400000005960464],"min":[-0.400000005960464,0,-0.400000005960464],"name":"circle_loop","type":"VEC3"},{"bufferView":2,"byteOffset":0,"componentType":5126,"count":9,"max":[0.400000005960464,0.400000005960464,0],"min":[-0.400000005960464,-0.400000005960464,0],"name":"circle_loop","type":"VEC3"},{"bufferView":3,"byteOffset":0,"componentType":5126,"count":18,"max":[9,14.9442720413208,-1],"min":[-1.4721360206604,0,-1],"name":"buf_scattered_lines","type":"VEC3"},{"bufferView":4,"byteOffset":0,"componentType":5126,"count":2,"max":[0,0,-1],"min":[-8.32050228118896,-5.54700183868408,-1],"name":"buf_red_scattered_lines","type":"VEC3"}],"asset":{"version":"2.0"},"bufferViews":[{"buffer":0,"byteLength":108,"byteOffset":0,"name":"circle_loop","target":34962},{"buffer":1,"byteLength":108,"byteOffset":0,"name":"circle_loop","target":34962},{"buffer":2,"byteLength":108,"byteOffset":0,"name":"circle_loop","target":34962},{"buffer":3,"byteLength":216,"byteOffset":0,"name":"buf_scattered_lines","target":34962},{"buffer":4,"byteLength":24,"byteOffset":0,"name":"buf_red_scattered_lines","target":34962}],"buffers":[{"byteLength":108,"name":"circle_loop","uri":"data:application/octet-stream;base64,AAAAAM3MzD4AAAAAAAAAAMPQkD7D0JA+AAAAAPIwlrLNzMw+AAAAAMPQkL7D0JA+AAAAAM3MzL7yMBazAAAAAMHQkL7E0JC+AAAAAPLkozHNzMy+AAAAAMbQkD6/0JC+AAAAAM3MzD4AAAAA"},{"byteLength":108,"name":"circle_loop","uri":"data:application/octet-stream;base64,AAAAAAAAAADNzMw+w9CQPgAAAADD0JA+zczMPgAAAADyMJayw9CQPgAAAADD0JC+8jAWswAAAADNzMy+xNCQvgAAAADB0JC+zczMvgAAAADy5KMxv9CQvgAAAADG0JA+AAAAAAAAAADNzMw+"},{"byteLength":108,"name":"circle_loop","uri":"data:application/octet-stream;base64,zczMPgAAAAAAAAAAw9CQPsPQkD4AAAAA8jCWss3MzD4AAAAAw9CQvsPQkD4AAAAAzczMvvIwFrMAAAAAwdCQvsTQkL4AAAAA8uSjMc3MzL4AAAAAxtCQPr/QkL4AAAAAzczMPgAAAAAAAAAA"},{"byteLength":216,"name":"buf_scattered_lines","uri":"data:application/octet-stream;base64,AAAAAAAAAAAAAIC/AABAQAAAAAAAAIC/AABAQAAAAAAAAIC/AAAAAAAAQEAAAIC/AAAAAAAAQEAAAIC/AAAAAAAAwEAAAIC/AAAAAAAAwEAAAIC/AABAQAAAQEAAAIC/AABAQAAAQEAAAIC/AADAQAAAAAAAAIC/AADAQAAAAAAAAIC/AAAQQQAAAAAAAIC/AAAQQQAAAAAAAIC/AADAQAAAQEAAAIC/AADAQAAAQEAAAIC/AABAQAAAwEAAAIC/AABAQAAAwEAAAIC/9G68v70bb0EAAIC/"},{"byteLength":24,"name":"buf_red_scattered_lines","uri":"data:application/octet-stream;base64,AAAAAAAAAAAAAIC/xyAFwQqBscAAAIC/"}],"materials":[{"doubleSided":true,"name":"black","pbrMetallicRoughness":{"baseColorFactor":[0,0,0,1],"metallicFactor":1,"roughnessFactor":1}},{"doubleSided":true,"name":"black","pbrMetallicRoughness":{"baseColorFactor":[0,0,0,1],"metallicFactor":1,"roughnessFactor":1}},{"doubleSided":true,"name":"red","pbrMetallicRoughness":{"baseColorFactor":[1,0,0,1],"metallicFactor":1,"roughnessFactor":1}}],"meshes":[{"primitives":[{"attributes":{"POSITION":0},"material":0,"mode":6},{"attributes":{"POSITION":1},"material":0,"mode":6},{"attributes":{"POSITION":2},"material":0,"mode":6}]},{"primitives":[{"attributes":{"POSITION":3},"material":1,"mode":1}]},{"primitives":[{"attributes":{"POSITION":4},"material":2,"mode":1}]}],"nodes":[{"mesh":0,"translation":[0,0,-1]},{"mesh":0,"translation":[3,0,-1]},{"mesh":0,"translation":[0,3,-1]},{"mesh":0,"translation":[0,6,-1]},{"mesh":0,"translation":[3,3,-1]},{"mesh":0,"translation":[6,0,-1]},{"mesh":0,"translation":[9,0,-1]},{"mesh":0,"translation":[6,3,-1]},{"mesh":0,"translation":[3,6,-1]},{"mesh":1,"translation":[0,0,0]},{"mesh":2,"translation":[0,0,0]}],"scene":0,"scenes":[{"nodes":[0,1,2,3,4,5,6,7,8,9,10]}]}
1 change: 0 additions & 1 deletion testdata/match_graph_no_coords.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e45580

Please sign in to comment.