diff --git a/build_wasm.sh b/build_wasm.sh index a621f59..e8fd2da 100755 --- a/build_wasm.sh +++ b/build_wasm.sh @@ -9,13 +9,16 @@ fi rm -rf docs/lib mkdir -p docs/lib -# Generate test_numpy.js from test source +# Generate test_sources.js from all test files python3 -c " -import json -with open('tests/test_numpy.py') as f: - src = f.read() -print('var TEST_SOURCE = ' + json.dumps(src) + ';') -" > docs/test_numpy.js +import json, glob, os +sources = {} +for path in sorted(glob.glob('tests/*.py')): + name = os.path.basename(path) + with open(path) as f: + sources[name] = f.read() +print('var TEST_SOURCES = ' + json.dumps(sources) + ';') +" > docs/test_sources.js # Common flags DEFINES="-DPK_ENABLE_OS=0 -DPK_ENABLE_THREADS=0 -DPK_ENABLE_DETERMINISM=0 \ diff --git a/docs/index.html b/docs/index.html index 8c4ee56..b3f76ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -76,6 +76,17 @@ min-height: 50px; line-height: 1.4; } + #file-select { + font-family: monospace; + font-size: 14px; + padding: 4px 8px; + margin-bottom: 6px; + background-color: #282a36; + color: #f8f8f2; + border: 1px solid #444; + border-radius: 4px; + outline: none; + } .pass { color: #4ec9b0; font-weight: bold; } .fail { color: #f44747; font-weight: bold; } @@ -83,6 +94,7 @@

pocket-numpy

GitHub: cubao/xtensor-numpy +
1
@@ -92,7 +104,7 @@

pocket-numpy

Loading WASM module...

 
-  
+