MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / eqCharPos

Function eqCharPos

lib/web/CodeMirror/test/driver.js:108–114  ·  view source on GitHub ↗
(a, b, msg)

Source from the content-addressed store, hash-verified

106 throw new Failure(label(a + " is not close to " + b + " (" + margin + ")", msg));
107}
108function eqCharPos(a, b, msg) {
109 function str(p) { return "{line:" + p.line + ",ch:" + p.ch + ",sticky:" + p.sticky + "}"; }
110 if (a == b) return;
111 if (a == null) throw new Failure(label("comparing null to " + str(b), msg));
112 if (b == null) throw new Failure(label("comparing " + str(a) + " to null", msg));
113 if (a.line != b.line || a.ch != b.ch) throw new Failure(label(str(a) + " != " + str(b), msg));
114}
115function eqCursorPos(a, b, msg) {
116 eqCharPos(a, b, msg);
117 if (a) eq(a.sticky, b.sticky, msg ? msg + ' (sticky)' : 'sticky');

Callers 11

testFunction · 0.85
hasSelectionsFunction · 0.85
hasCursorsFunction · 0.85
multi_test.jsFile · 0.85
testFunction · 0.85
test.jsFile · 0.85
doc_test.jsFile · 0.85
eqCursorPosFunction · 0.85
hasSelFunction · 0.85
runFunction · 0.85

Calls 2

labelFunction · 0.85
strFunction · 0.85

Tested by 2

testFunction · 0.68
testFunction · 0.68