public void testClassStringFields() { String content = "class __sv_builtin_covergroup_options;\n" + "int weight;\n" + "\n" + "real goal;\n" + "\n" + "string name;\n" + "\n" + "string comment;\n" + "\n" + "int at_least;\n" + "\n" + "bit detect_overlap;\n" + "\n" + "int auto_bin_max;\n" + "\n" + "bit per_instance;\n" + "\n" + "bit cross_num_print_missing;\n" + "\n" + "endclass\n"; LogHandle log = LogFactory.getLogHandle("testClassStringFields"); SVDBFile file = SVDBTestUtils.parse(content, "testClassStringFields"); SVDBClassDecl cg_options = null; for (ISVDBItemBase it : file.getChildren()) { if (SVDBItem.getName(it).equals("__sv_builtin_covergroup_options")) { cg_options = (SVDBClassDecl) it; } log.debug("Item: " + it.getType() + " " + SVDBItem.getName(it)); } assertNotNull("Failed to find class __sv_builtin_covergroup_options", cg_options); for (ISVDBItemBase it : cg_options.getChildren()) { log.debug(" Item: " + it.getType() + " " + SVDBItem.getName(it)); assertNotNull("Item " + SVDBItem.getName(it) + " does not have a location", it.getLocation()); if (SVDBStmt.isType(it, SVDBItemType.VarDeclStmt)) { assertNotNull( "Field " + SVDBItem.getName(it) + " does not have a type", ((SVDBVarDeclStmt) it).getTypeInfo()); } } }