浏览代码

docs: 增加覆盖率文档

RyanCW 2 周之前
父节点
当前提交
175032af39
共有 26 个文件被更改,包括 293 次插入1 次删除
  1. 0 1
      .gitignore
  2. 99 0
      docs/control.js
  3. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJson.c.html
  4. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJson.h.html
  5. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonConfig.h.html
  6. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonUtils.c.html
  7. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonUtils.h.html
  8. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/example/RyanJsonExample.c.html
  9. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/externalModule/cJSON/cJSON.c.html
  10. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/externalModule/cJSON/cJSON.h.html
  11. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonMemoryFootprintTest.c.html
  12. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonRFC8259JsonTest.c.html
  13. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonTest.c.html
  14. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTest.c.html
  15. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTest.h.html
  16. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestChangeJson.c.html
  17. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestCompareJson.c.html
  18. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestCreateJson.c.html
  19. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestDuplicateJson.c.html
  20. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestForEachJson.c.html
  21. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestLoadJson.c.html
  22. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestUtile.c.html
  23. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/fuzzer/RyanJsonFuzzer.c.html
  24. 0 0
      docs/coverage/home/ryan/linux/appDev/RyanJson/test/valloc/valloc.c.html
  25. 0 0
      docs/index.html
  26. 194 0
      docs/style.css

+ 0 - 1
.gitignore

@@ -19,4 +19,3 @@ build
 default.profdata
 default.profraw
 test/fuzzer/corpus
-docs

+ 99 - 0
docs/control.js

@@ -0,0 +1,99 @@
+
+function next_uncovered(selector, reverse, scroll_selector) {
+  function visit_element(element) {
+    element.classList.add("seen");
+    element.classList.add("selected");
+
+    if (!scroll_selector) {
+      scroll_selector = "tr:has(.selected) td.line-number"
+    }
+
+    const scroll_to = document.querySelector(scroll_selector);
+    if (scroll_to) {
+      scroll_to.scrollIntoView({behavior: "smooth", block: "center", inline: "end"});
+    }
+  }
+
+  function select_one() {
+    if (!reverse) {
+      const previously_selected = document.querySelector(".selected");
+
+      if (previously_selected) {
+        previously_selected.classList.remove("selected");
+      }
+
+      return document.querySelector(selector + ":not(.seen)");
+    } else {
+      const previously_selected = document.querySelector(".selected");
+
+      if (previously_selected) {
+        previously_selected.classList.remove("selected");
+        previously_selected.classList.remove("seen");
+      }
+
+      const nodes = document.querySelectorAll(selector + ".seen");
+      if (nodes) {
+        const last = nodes[nodes.length - 1]; // last
+        return last;
+      } else {
+        return undefined;
+      }
+    }
+  }
+
+  function reset_all() {
+    if (!reverse) {
+      const all_seen = document.querySelectorAll(selector + ".seen");
+
+      if (all_seen) {
+        all_seen.forEach(e => e.classList.remove("seen"));
+      }
+    } else {
+      const all_seen = document.querySelectorAll(selector + ":not(.seen)");
+
+      if (all_seen) {
+        all_seen.forEach(e => e.classList.add("seen"));
+      }
+    }
+
+  }
+
+  const uncovered = select_one();
+
+  if (uncovered) {
+    visit_element(uncovered);
+  } else {
+    reset_all();
+
+    const uncovered = select_one();
+
+    if (uncovered) {
+      visit_element(uncovered);
+    }
+  }
+}
+
+function next_line(reverse) {
+  next_uncovered("td.uncovered-line", reverse)
+}
+
+function next_region(reverse) {
+  next_uncovered("span.red.region", reverse);
+}
+
+function next_branch(reverse) {
+  next_uncovered("span.red.branch", reverse);
+}
+
+document.addEventListener("keypress", function(event) {
+  const reverse = event.shiftKey;
+  if (event.code == "KeyL") {
+    next_line(reverse);
+  }
+  if (event.code == "KeyB") {
+    next_branch(reverse);
+  }
+  if (event.code == "KeyR") {
+    next_region(reverse);
+  }
+});

文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJson.h.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonConfig.h.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonUtils.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/RyanJson/RyanJsonUtils.h.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/example/RyanJsonExample.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/externalModule/cJSON/cJSON.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/externalModule/cJSON/cJSON.h.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonMemoryFootprintTest.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonRFC8259JsonTest.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/RyanJsonTest.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTest.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTest.h.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestChangeJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestCompareJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestCreateJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestDuplicateJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestForEachJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestLoadJson.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/baseTest/RyanJsonBaseTestUtile.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/fuzzer/RyanJsonFuzzer.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/coverage/home/ryan/linux/appDev/RyanJson/test/valloc/valloc.c.html


文件差异内容过多而无法显示
+ 0 - 0
docs/index.html


+ 194 - 0
docs/style.css

@@ -0,0 +1,194 @@
+.red {
+  background-color: #f004;
+}
+.cyan {
+  background-color: cyan;
+}
+html {
+  scroll-behavior: smooth;
+}
+body {
+  font-family: -apple-system, sans-serif;
+}
+pre {
+  margin-top: 0px !important;
+  margin-bottom: 0px !important;
+}
+.source-name-title {
+  padding: 5px 10px;
+  border-bottom: 1px solid #8888;
+  background-color: #0002;
+  line-height: 35px;
+}
+.centered {
+  display: table;
+  margin-left: left;
+  margin-right: auto;
+  border: 1px solid #8888;
+  border-radius: 3px;
+}
+.expansion-view {
+  margin-left: 0px;
+  margin-top: 5px;
+  margin-right: 5px;
+  margin-bottom: 5px;
+  border: 1px solid #8888;
+  border-radius: 3px;
+}
+table {
+  border-collapse: collapse;
+}
+.light-row {
+  border: 1px solid #8888;
+  border-left: none;
+  border-right: none;
+}
+.light-row-bold {
+  border: 1px solid #8888;
+  border-left: none;
+  border-right: none;
+  font-weight: bold;
+}
+.column-entry {
+  text-align: left;
+}
+.column-entry-bold {
+  font-weight: bold;
+  text-align: left;
+}
+.column-entry-yellow {
+  text-align: left;
+  background-color: #ff06;
+}
+.column-entry-red {
+  text-align: left;
+  background-color: #f004;
+}
+.column-entry-gray {
+  text-align: left;
+  background-color: #fff4;
+}
+.column-entry-green {
+  text-align: left;
+  background-color: #0f04;
+}
+.line-number {
+  text-align: right;
+}
+.covered-line {
+  text-align: right;
+  color: #06d;
+}
+.uncovered-line {
+  text-align: right;
+  color: #d00;
+}
+.uncovered-line.selected {
+  color: #f00;
+  font-weight: bold;
+}
+.region.red.selected {
+  background-color: #f008;
+  font-weight: bold;
+}
+.branch.red.selected {
+  background-color: #f008;
+  font-weight: bold;
+}
+.tooltip {
+  position: relative;
+  display: inline;
+  background-color: #bef;
+  text-decoration: none;
+}
+.tooltip span.tooltip-content {
+  position: absolute;
+  width: 100px;
+  margin-left: -50px;
+  color: #FFFFFF;
+  background: #000000;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
+  visibility: hidden;
+  border-radius: 6px;
+}
+.tooltip span.tooltip-content:after {
+  content: '';
+  position: absolute;
+  top: 100%;
+  left: 50%;
+  margin-left: -8px;
+  width: 0; height: 0;
+  border-top: 8px solid #000000;
+  border-right: 8px solid transparent;
+  border-left: 8px solid transparent;
+}
+:hover.tooltip span.tooltip-content {
+  visibility: visible;
+  opacity: 0.8;
+  bottom: 30px;
+  left: 50%;
+  z-index: 999;
+}
+th, td {
+  vertical-align: top;
+  padding: 2px 8px;
+  border-collapse: collapse;
+  border-right: 1px solid #8888;
+  border-left: 1px solid #8888;
+  text-align: left;
+}
+td pre {
+  display: inline-block;
+  text-decoration: inherit;
+}
+td:first-child {
+  border-left: none;
+}
+td:last-child {
+  border-right: none;
+}
+tr:hover {
+  background-color: #eee;
+}
+tr:last-child {
+  border-bottom: none;
+}
+tr:has(> td >a:target), tr:has(> td.uncovered-line.selected) {
+  background-color: #8884;
+}
+a {
+  color: inherit;
+}
+.control {
+  position: fixed;
+  top: 0em;
+  right: 0em;
+  padding: 1em;
+  background: #FFF8;
+}
+@media (prefers-color-scheme: dark) {
+  body {
+    background-color: #222;
+    color: whitesmoke;
+  }
+  tr:hover {
+    background-color: #111;
+  }
+  .covered-line {
+    color: #39f;
+  }
+  .uncovered-line {
+    color: #f55;
+  }
+  .tooltip {
+    background-color: #068;
+  }
+  .control {
+    background: #2228;
+  }
+  tr:has(> td >a:target), tr:has(> td.uncovered-line.selected) {
+    background-color: #8884;
+  }
+}

部分文件因为文件数量过多而无法显示