auto fixed = IconSubDir(32, IconSubDir.Type.Fixed); assert(matchIconSize(fixed, fixed.size())); assert(!matchIconSize(fixed, fixed.size() - 2)); auto threshold = IconSubDir(32, IconSubDir.Type.Threshold, "", 0, 0, 5); assert(matchIconSize(threshold, threshold.size() + threshold.threshold())); assert(matchIconSize(threshold, threshold.size() - threshold.threshold())); assert(!matchIconSize(threshold, threshold.size() + threshold.threshold() + 1)); assert(!matchIconSize(threshold, threshold.size() - threshold.threshold() - 1)); auto scalable = IconSubDir(32, IconSubDir.Type.Scalable, "", 24, 48); assert(matchIconSize(scalable, scalable.minSize())); assert(matchIconSize(scalable, scalable.maxSize())); assert(!matchIconSize(scalable, scalable.minSize() - 1)); assert(!matchIconSize(scalable, scalable.maxSize() + 1));
Check if matchSize belongs to subdir's size range.