@Test
	public void testSetCallingConvention() throws Exception {
		// NotepadMergeListingTest has "unknown", "default", "__stdcall", "__cdecl", "__fastcall", "__thiscall".
		// 01006420 entry()
		// 01001ae3 FUN_01001ae3(p1,p2)
		// 010021f3 FUN_010021f3(p1)
		// 0100248f FUN_0100248f(p1,p2,p3,p4)
		// 01002c93 FUN_01002c93(p1,p2,p3)

		mtf.initialize("NotepadMergeListingTest_X86", new ProgramModifierListener() {

			@Override
			public void modifyLatest(ProgramDB program) {
				try {
					Function func;
					func = getFunction(program, "0x01006420");
					func.setCallingConvention("__stdcall");
					func = getFunction(program, "0x010021f3");
					func.setCallingConvention("__thiscall");
					func = getFunction(program, "0x0100248f");
					func.setCallingConvention("__fastcall");
					func = getFunction(program, "0x01002c93");
					func.setCallingConvention("__fastcall");
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}

			@Override
			public void modifyPrivate(ProgramDB program) {
				try {
					Function func;
					func = getFunction(program, "0x01001ae3");
					func.setCallingConvention(Function.DEFAULT_CALLING_CONVENTION_STRING);
					func = getFunction(program, "0x010021f3");
					func.setCallingConvention("__cdecl");
					func = getFunction(program, "0x0100248f");
					func.setCallingConvention("__fastcall");
					func = getFunction(program, "0x01002c93");
					func.setCallingConvention(Function.DEFAULT_CALLING_CONVENTION_STRING);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
			}
		});

		executeMerge(ASK_USER);
		chooseVariousOptions("0x010021f3", new int[] { INFO_ROW, KEEP_LATEST });
		chooseVariousOptions("0x01002c93", new int[] { INFO_ROW, KEEP_MY });
		waitForMergeCompletion();

		// 01006420 entry()
		// 01001ae3 FUN_01001ae3(p1,p2)
		// 010021f3 FUN_010021f3(p1)
		// 0100248f FUN_0100248f(p1,p2,p3,p4)
		// 01002c93 FUN_010023c93(p1,p2,p3)
		Function func;
		func = getFunction(resultProgram, "0x01006420");
		assertEquals("__stdcall", func.getCallingConventionName());
		func = getFunction(resultProgram, "0x01001ae3");
		assertEquals(Function.DEFAULT_CALLING_CONVENTION_STRING, func.getCallingConventionName());
		func = getFunction(resultProgram, "0x010021f3");
		assertEquals("__thiscall", func.getCallingConventionName());
		func = getFunction(resultProgram, "0x0100248f");
		assertEquals("__fastcall", func.getCallingConventionName());
		func = getFunction(resultProgram, "0x01002c93");
		assertEquals(Function.DEFAULT_CALLING_CONVENTION_STRING, func.getCallingConventionName());
	}
Test the merge of the versioned program's listing.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/FunctionMergeManager2Test.java