Write the test unit for self in a nit compilable file.

Property definitions

nitc $ TestSuite :: write_to_nit
	# Write the test unit for `self` in a nit compilable file.
	fun write_to_nit do
		var file = new Template
		file.addn "intrude import core"
		file.addn "import {mmodule.name}\n"
		file.addn "var name = args.first"
		for before_module in before_all do
			before_module.write_to_nit(file)
		end
		for test_class in test_classes do
			for case in test_class.before_all do
				case.write_to_nit(file)
			end
			for case in test_class.test_cases do
				case.write_to_nit(file)
			end
			for case in test_class.after_all do
				case.write_to_nit(file)
			end
		end
		for after_module in after_all do
			after_module.write_to_nit(file)
		end
		file.write_to_file("{test_file}.nit")
	end
src/testing/testing_suite.nit:258,2--282,4