void assert_helper(vector<int> list1, vector<int> list2, vector<int> expected){ auto l1 = ConstructList(list1); auto l2 = ConstructList(list2); Solution sln; auto actual = sln.mergeTwoLists(l1, l2); for (auto v : expected){ Assert::AreEqual(v, actual->val); actual = actual->next; } Assert::IsNull(actual); }
void ResourceLibraryDialog::OnlistCtrlItemActivated(wxListEvent& event) { if ( event.GetLabel() == _("Parent folder") && event.GetIndex() == 0 ) { wxFileName dir = wxFileName::DirName(currentDir+"/.."); currentDir = dir.GetPath(); ConstructList(); } else if (wxDirExists(currentDir+"/"+event.GetLabel())) { wxFileName filename = wxFileName::FileName(currentDir+"/"+event.GetLabel()); filename.Normalize(); currentDir = filename.GetFullPath(); ConstructList(); } }