Skip to content
Permalink
Browse files
8280951: Testbug: fix commented asserts in XXViewTest.test_rt_29650
Reviewed-by: kcr
  • Loading branch information
Jeanette Winzenburg committed Feb 3, 2022
1 parent 59cd8ec commit 929e7c9217ff7ea04f9bb31bd5c1bf7d74086752
Showing 3 changed files with 7 additions and 10 deletions.
@@ -821,7 +821,7 @@ public void updateItem(String item, boolean empty) {
listView.setOnEditStart(t -> {
rt_29650_start_count++;
});
listView.setOnEditCommit(t -> {
listView.addEventHandler(ListView.editCommitEvent(), t -> {
rt_29650_commit_count++;
});
listView.setOnEditCancel(t -> {
@@ -844,8 +844,7 @@ public void updateItem(String item, boolean empty) {
KeyEventFirer keyboard = new KeyEventFirer(textField);
keyboard.doKeyPress(KeyCode.ENTER);

// TODO should the following assert be enabled?
// assertEquals("Testing!", listView.getItems().get(0));
assertEquals("Testing!", listView.getItems().get(0));
assertEquals(1, rt_29650_start_count);
assertEquals(1, rt_29650_commit_count);
assertEquals(0, rt_29650_cancel_count);
@@ -1915,7 +1915,7 @@ public TableCell<Person, String> call(TableColumn<Person, String> p) {
first.setOnEditStart(t -> {
rt_29650_start_count++;
});
first.setOnEditCommit(t -> {
first.addEventHandler(TableColumn.editCommitEvent(), t -> {
rt_29650_commit_count++;
});
first.setOnEditCancel(t -> {
@@ -1934,8 +1934,7 @@ public TableCell<Person, String> call(TableColumn<Person, String> p) {
KeyEventFirer keyboard = new KeyEventFirer(textField);
keyboard.doKeyPress(KeyCode.ENTER);

// TODO should the following assert be enabled?
// assertEquals("Testing!", listView.getItems().get(0));
assertEquals("Testing!", table.getItems().get(0).getFirstName());
assertEquals(1, rt_29650_start_count);
assertEquals(1, rt_29650_commit_count);
assertEquals(0, rt_29650_cancel_count);
@@ -2818,13 +2818,13 @@ public TreeTableCell<String, String> call(TreeTableColumn<String, String> p) {
TreeTableColumn<String, String> col = new TreeTableColumn<>("column");
Callback<TreeTableColumn<String, String>, TreeTableCell<String, String>> factory = TextFieldTreeTableCell.forTreeTableColumn();
col.setCellFactory(factory);
col.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getValue()));
col.setCellValueFactory(param -> param.getValue().valueProperty());
treeTableView.getColumns().add(col);

col.setOnEditStart(t -> {
rt_29650_start_count++;
});
col.setOnEditCommit(t -> {
col.addEventHandler(TreeTableColumn.editCommitEvent(), t -> {
rt_29650_commit_count++;
});
col.setOnEditCancel(t -> {
@@ -2843,8 +2843,7 @@ public TreeTableCell<String, String> call(TreeTableColumn<String, String> p) {
KeyEventFirer keyboard = new KeyEventFirer(textField);
keyboard.doKeyPress(KeyCode.ENTER);

// TODO should the following assert be enabled?
// assertEquals("Testing!", listView.getItems().get(0));
assertEquals("Testing!", treeTableView.getTreeItem(0).getValue());
assertEquals(1, rt_29650_start_count);
assertEquals(1, rt_29650_commit_count);
assertEquals(0, rt_29650_cancel_count);

1 comment on commit 929e7c9

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 929e7c9 Feb 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.