For test purposes only.
336986
final void waitForSizeQueue(final int queueSize) {
    synchronized (this.queue) {
      while (this.queue.size() > queueSize) {
        try {
          this.queue.wait(250L);
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
        }
      }
      try {
        Thread.sleep(500L);
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }
      this.queue.notifyAll();
    }
  }
1286768
function(test) {
      if (jsl.indexOf(JSLitmus._queue, test) >= 0) return;
      JSLitmus._queue.push(test);
      JSLitmus.renderTest(test);
      JSLitmus._nextTest();
    }
835236
function (name, test) {
                        try {
                            if (_.isFunction (test)) {                               test () }
                                                else { _.each (test, function (fn) { fn () }) } }
                        catch (e) {
                            if (_.isAssertionError (e)) { var printedName = ((_.isArray (name) && name) || [name]).join ('.')
                                                          console.log (printedName + ':', e.message, '\n' + _.times (printedName.length, _.constant ('~')).join ('') + '\n')
                                                         _.each (e.notMatching, function (x) { console.log ('  •', x) }) }
                            throw e } }
472520
def addSuccess(self, test):
        
        super().addSuccess(test)
        self.test_info(test)
        self._call_test_results('addSuccess', test)
978605
function( name, test, startFunc, extra ) {
		var self = this;

		// Require an active state for tests
		self.requireState( munit.ASSERT_STATE_ACTIVE, startFunc || self.ok );

		// Prevent non empty string names
		if ( ! munit.isString( name ) || ! name.length ) {
			throw new munit.AssertionError(
				"Name not found for test on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}
		// Prevent duplicate tests
		else if ( self.tests[ name ] ) {
			throw new munit.AssertionError(
				"Duplicate Test '" + name + "' on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}

		// Increment test count and mark it
		self[ !!( test ) ? '_pass' : '_fail' ]( name, startFunc || self.ok, extra );
		
		// Reached expected number of tests, close off
		if ( self.options.expect > 0 && self.count >= self.options.expect ) {
			self.close();
		}

		return self;
	}
420691
def postinit(self, test=None, fail=None):
        
        self.fail = fail
        self.test = test
96142
function (partStatistics) {
        this.count += partStatistics.count;
        this.tested += partStatistics.tested;
        this.ignored += partStatistics.ignored;
    }
427048
def non_sampling_sampler(circuit, meas):
    """"""
    meas = tuple(meas)
    n_qubits = circuit.n_qubits
    return expect(circuit.run(returns="statevector"), meas)
884910
def keyword_only(func):
    
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        if len(args) > 0:
            raise TypeError("Method %s forces keyword arguments." % func.__name__)
        self._input_kwargs = kwargs
        return func(self, **kwargs)
    return wrapper
110752
def only(names)
      filtered_stats = @stats.select do |stat|
        names.include? stat[:name]
      end
      StatsRegistry.new(filtered_stats)
    end
998665
static public void assertEquals(String message, short expected, short actual) {
        		assertEquals(message, new Short(expected), new Short(actual));
    	}
1079723
private boolean validOrthologousStatement(final Statement stmt) {
        // test statement is well-formed
        if (stmt.getRelationshipType() == RelationshipType.ORTHOLOGOUS
                && stmt.getObject() != null
                && stmt.getObject().getTerm() != null) {

            // test subject has only one namespace parameter
            final Term subject = stmt.getSubject();
            List<Parameter> subparams = subject.getParameters();
            if (subparams == null || subparams.size() != 1
                    || subparams.get(0).getNamespace() == null) {
                return false;
            }

            // test object has only one namespace parameter
            final Term object = stmt.getObject().getTerm();
            List<Parameter> objparams = object.getParameters();
            if (objparams == null || objparams.size() != 1
                    || objparams.get(0).getNamespace() == null) {
                return false;
            }

            return true;
        }

        return false;
    }
1322606
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;
			var endOfInitSegments = forkContext.head;
			var testSegments = forkContext.makeNext(-1, -1);

			// Update state.
			context.test = test;
			context.endOfInitSegments = endOfInitSegments;
			context.continueDestSegments = context.testSegments = testSegments;
			forkContext.replaceHead(testSegments);
		}
99684
function (test) {
        var baseline = !(test.selector && test.selector.name !== "*");
        if (!logHolder) {
            return; // logging was not enabled
        }

        var remaining = test.cfg.allSelectors.length;
        var heading = 'Testing <strong>' + (baseline ? test.name : test.selector.name) + '</strong>';
        var message = '<br />' + (baseline ? 'baseline' : test.selector.location);
        var footer = '<br />' + remaining + ' remaining test' + (remaining === 1 ? '' : 's');

        logHolder.innerHTML = heading + message + footer;
    }
351853
function(tc) {
            var t = this;
            var output = '';
            if (tc.getResult() != TestCase.UNTESTED) {

                output += '        <testcase name="' + encode(tc.getName()) + '"'
                    + ' time="' + (tc.getDuration() / 1000) + '">\n';

                if (tc.getResult() == TestCase.SKIPPED) {
                    output += '            <skipped></skipped>\n';
                }

                tc.getAssertions().forEach(
                    function(assertion) {
                        output += t.getAssertion(assertion);
                    }
                );

                var ge = tc.getGeneralError();
                if (ge) {
                    output += t.getError(ge);
                }

                output += '        </testcase>\n';
            }
            return output;
        }
1103537
function measure(test, done) {
    var start = now();
    test(function (error, results) {
        var stop = now();
        done(error, results, stop - start);
    });
}
293199
boolean scanIsEmpty() {
		// This 'slow' implementation is still faster than any external one
		// could be
		// (e.g.: (bitSet.length() == 0 || bitSet.nextSetBit(0) == -1))
		// especially for small BitSets
		// Depends on the ghost bits being clear!
		final int count = numWords;

		for (int i = 0; i < count; i++) {
			if (bits[i] != 0)
				return false;
		}

		return true;
	}