Skip to content

Commit

Permalink
refactor: rename GetTaskList to GetNodeList
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Jan 15, 2025
1 parent 2ee8277 commit 2578a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ func (r *Resource) GetHash() (string, bool) {
return hash.Get(), true
}

// GetTaskList returns the task list of the resource.
func (r *Resource) GetTaskList() ([]string, bool) {
// GetNodeList returns the node list of the resource.
func (r *Resource) GetNodeList() ([]string, bool) {
taskList := buffer.NewStringListBuffer()
defer taskList.Destroy()

got := maa.MaaResourceGetTaskList(r.handle, uintptr(taskList.Handle()))
got := maa.MaaResourceGetNodeList(r.handle, uintptr(taskList.Handle()))

Check failure on line 267 in resource.go

View workflow job for this annotation

GitHub Actions / macos (macos-13, x86_64)

undefined: maa.MaaResourceGetNodeList

Check failure on line 267 in resource.go

View workflow job for this annotation

GitHub Actions / windows (x86_64)

undefined: maa.MaaResourceGetNodeList

Check failure on line 267 in resource.go

View workflow job for this annotation

GitHub Actions / ubuntu (x86_64)

undefined: maa.MaaResourceGetNodeList

Check failure on line 267 in resource.go

View workflow job for this annotation

GitHub Actions / macos (macos-14, aarch64)

undefined: maa.MaaResourceGetNodeList
if !got {
return []string{}, false
}
Expand Down
4 changes: 2 additions & 2 deletions resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ func TestResource_GetHash(t *testing.T) {
require.NotEqual(t, "0", hash)
}

func TestResource_GetTaskList(t *testing.T) {
func TestResource_GetNodeList(t *testing.T) {
res := createResource(t, nil)
defer res.Destroy()
resDir := "./test/data_set/PipelineSmoking/resource"
isPathSet := res.PostBundle(resDir).Wait().Success()
require.True(t, isPathSet)
taskList, ok := res.GetTaskList()
taskList, ok := res.GetNodeList()
require.True(t, ok)
require.NotEmpty(t, taskList)
}

0 comments on commit 2578a55

Please sign in to comment.