Skip to content

Instantly share code, notes, and snippets.

View zenspider's full-sized avatar
🌈
It's complicated?

Ryan Davis zenspider

🌈
It's complicated?
View GitHub Profile
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// TODO: import cppunit as direct build
const flags = .{
// TODO: "-std=c++17",
# alt 3
sclas =
stack.last ||
(is_spec_class && self) ||
Minitest::Spec.spec_type(desc, *additional_desc)
# alt 4
sclas =
stack.last \
|| (is_spec_class && self) \
#!/bin/bash
set -e
# set -xv
DIR=/usr/local/opt/zig
if [ "$1" == "clean" ]; then
shift
echo "...from clean"
diff -r old/lib/minitest/assertions.rb new/lib/minitest/assertions.rb
--- old/lib/minitest/assertions.rb
+++ new/lib/minitest/assertions.rb
@@ -212,8 +212,12 @@
# See also: Minitest::Assertions.diff
def assert_equal exp, act, msg = nil
- msg = message(msg, E) { diff exp, act }
- result = assert exp == act, msg
+ begin
diff -r old/lib/minitest.rb new/lib/minitest.rb
--- old/lib/minitest.rb
+++ new/lib/minitest.rb
@@ -647,7 +647,7 @@
##
# The location of the test method.
- attr_accessor :source_location
+ attr_writer :source_location
class ZenwebBuilder < WEBrick::HTTPServlet::FileHandler
@@semaphore = Mutex.new
def service req, res
@@site ||= @@semaphore.synchronize { website }
url = req.path
target_path = File.join(".site", url)
target_path = File.join target_path, "index.html" if
--- //src/minitest/dev/lib/minitest.rb 2024-08-14 03:41:56.000000000 -0700
+++ /Users/ryan/Work/p4/zss/src/minitest/dev/lib/minitest.rb 2024-08-14 03:41:56.000000000 -0700
@@ -416,7 +416,7 @@
t0 = name = nil
- handler = lambda do
+ @_info_handler = lambda do
unless reporter.passed? then
warn "Current results:"
library typ size time wall mrss
null pos 10000 0.000000s 0.03s 18.83M
null neg 10000 0.000000s 0.03s 22.69M
minitest pos 10000 0.045201s 0.09s 24.85M
minitest neg 10000 0.086590s 0.27s 78.61M
minitest-q pos 10000 0.030654s 0.08s 26.20M
minitest-q neg 10000 0.061227s 0.25s 77.82M
test-unit pos 10000 0.105704s 0.21s 34.70M
test-unit neg 10000 4.008822s 4.12s 46.19M
10579 $ N=100000 ./minitest_multiversion.rb -q
1.1.0 = 0.121956s 0.22s 819967.86 rps
1.2.1 = 0.183326s 0.29s 545476.36 rps
1.3.1 = 0.245228s 0.35s 407783.78 rps
1.4.2 = 0.310824s 0.41s 321725.48 rps
...
2.12.1 = 0.404904s 0.51s 246972.12 rps
3.0.1 = 0.405681s 0.51s 246499.10 rps
...
3.5.0 = 0.405145s 0.51s 246825.21 rps
diff -r old/lib/minitest/rake_reporter.rb new/lib/minitest/rake_reporter.rb
--- old/lib/minitest/rake_reporter.rb
+++ new/lib/minitest/rake_reporter.rb
@@ -2,9 +2,16 @@
module Minitest
class RakeReporter < SprintReporter
+ attr_accessor :name
+
+ def initialize name = nil