rem: CHK(appFileInfo.SetTo(&file) == B_OK); CHK(appFileInfo.IsUsingAttributes() == true); CHK(appFileInfo.IsUsingResources() == true); appFileInfo.SetInfoLocation(B_USE_RESOURCES); CHK(appFileInfo.IsUsingAttributes() == false); CHK(appFileInfo.IsUsingResources() == true);
add: SyncResources(appFileInfo);
context: InfoLocationTester(const Value &testValue1, const Value &testValue2,				   const Value &testValue3){	BFile file(testFile1, B_READ_WRITE);	BAppFileInfo appFileInfo;	CHK(appFileInfo.SetTo(&file) == B_OK);	CHK(appFileInfo.InitCheck() == B_OK);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == true);	// set value	CHK(Setter::Set(appFileInfo, testValue1) == B_OK);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == true);	// force resources synchronization	CHK(appFileInfo.SetTo(&file) == B_OK);	// get value	Value value;	CHK(Getter::Get(appFileInfo, value) == B_OK);	CHK(value == testValue1);	// check attribute/resource	Checker::CheckAttribute(file, testValue1);	Checker::CheckResource(file, testValue1);	// set on B_USE_ATTRIBUTES	appFileInfo.SetInfoLocation(B_USE_ATTRIBUTES);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == false);	// set value	CHK(Setter::Set(appFileInfo, testValue2) == B_OK);	// force resources synchronization	CHK(appFileInfo.SetTo(&file) == B_OK);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == true);	appFileInfo.SetInfoLocation(B_USE_ATTRIBUTES);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == false);	// get value	Value value1;	CHK(Getter::Get(appFileInfo, value1) == B_OK);	CHK(value1 == testValue2);	// check attribute/resource -- resource should be old	Checker::CheckAttribute(file, testValue2);	Checker::CheckResource(file, testValue1);	// set on B_USE_BOTH_LOCATIONS	appFileInfo.SetInfoLocation(B_USE_BOTH_LOCATIONS);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == true);	// get value -- the attribute is preferred	Value value2;	CHK(Getter::Get(appFileInfo, value2) == B_OK);	CHK(value2 == testValue2);	// set on B_USE_RESOURCES	appFileInfo.SetInfoLocation(B_USE_RESOURCES);	CHK(appFileInfo.IsUsingAttributes() == false);	CHK(appFileInfo.IsUsingResources() == true);	// set value	CHK(Setter::Set(appFileInfo, testValue3) == B_OK);	// force resources synchronization	CHK(appFileInfo.SetTo(&file) == B_OK);	CHK(appFileInfo.IsUsingAttributes() == true);	CHK(appFileInfo.IsUsingResources() == true);	appFileInfo.SetInfoLocation(B_USE_RESOURCES);	CHK(appFileInfo.IsUsingAttributes() == false);	CHK(appFileInfo.IsUsingResources() == true);	// get value	Value value3;	CHK(Getter::Get(appFileInfo, value3) == B_OK);	CHK(value3 == testValue3);	// check attribute/resource -- attribute should be old	Checker::CheckAttribute(file, testValue2);	Checker::CheckResource(file, testValue3);}