private void doTestComments(AddressSetView as, int matchCount) {
		ProgramLocation startLoc = new AddressFieldLocation(program, addr(0x01001000));
		String searchText = "EOL comment";
		//@formatter:off
		SearchOptions options =
			new SearchOptions(searchText, 
				false /*quick*/, 
				false /*functions*/, 
				true  /*comments*/, 
				false /*labels*/, 
				false /*instruction mnemonics*/, 
				false /*instruction operands*/, 
				false /*data mnemonics*/, 
				false /*data operands*/, 
				false /*case sensitive*/,
				true  /*is forward*/,
				false /* includeNonLoadedBlocks */,
				false /* searchAll */
				);
		//@formatter:on

		searcher =
			new ListingDisplaySearcher(tool, program, startLoc, null, options, TaskMonitor.DUMMY);

		//set up list of answers
		ArrayList<Address> startList = new ArrayList<>();

		startList.add(addr(0x01006642));
		startList.add(addr(0x01006648));

		//check that the text is found there in the correct field
		checkTextFound(startList, EolCommentFieldLocation.class);
	}
Test the searcher that searches fields in the Code Browser
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcherTest.java