Return the list of positions where actual and expected mismatch.

Indexes are in ascending order.

Property definitions

saxophonit $ SAXEventLogger :: diff_entry
	# Return the list of positions where `actual` and `expected` mismatch.
	#
	# Indexes are in ascending order.
	private fun diff_entry(actual: Array[String], expected: Array[String]):
			Array[Int] do
		var result = new Array[Int]
		var i = 0
		var min: Int
		var max: Int

		if actual.length < expected.length then
			min = actual.length
			max = expected.length
		else if expected.length < actual.length then
			min = expected.length
			max = actual.length
		else
			min = actual.length
			max = actual.length
		end

		while i < min do
			if expected[i] != actual[i] then
				result.push(i)
			end
			i += 1
		end
		result.insert_all([i..max[, result.length)
		return result
	end
lib/saxophonit/testing.nit:136,2--165,4