Skip to content

Commit

Permalink
Add equals() tests
Browse files Browse the repository at this point in the history
This also adds `NONE` enum members to bitmask types as a workaround
for jqno/equalsverifier#199.
  • Loading branch information
io7m committed Jul 8, 2018
1 parent 432f56e commit f332209
Show file tree
Hide file tree
Showing 17 changed files with 523 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanImageViewCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_IMAGE_VIEW_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanImageViewCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanLogicalDeviceCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_VULKAN_LOGICAL_DEVICE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanLogicalDeviceCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanPipelineColorBlendStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_VULKAN_PIPELINE_COLOR_BLEND_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineColorBlendStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineDepthStencilStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineDepthStencilStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineDynamicStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_DYNAMIC_STATE_CREATE_FLAG(0x0);

private final int value;

VulkanPipelineDynamicStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanPipelineInputAssemblyStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_VULKAN_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_FLAG(0x0);

private final int value;

VulkanPipelineInputAssemblyStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanPipelineLayoutCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_LAYOUT_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineLayoutCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineMultisampleStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_MULTISAMPLE_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineMultisampleStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanPipelineRasterizationStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_RASTERIZATION_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineRasterizationStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineShaderStageCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_SHADER_STAGE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineShaderStageCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineTessellationStageCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_VULKAN_PIPELINE_TESSELLATION_STAGE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineTessellationStageCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@

public enum VulkanPipelineVertexInputStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_VERTEX_INPUT_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineVertexInputStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanPipelineViewportStateCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_PIPELINE_VIEWPORT_STATE_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanPipelineViewportStateCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@

public enum VulkanRenderPassCreateFlag implements VulkanEnumBitmaskType
{
// CHECKSTYLE:OFF
;
// CHECKSTYLE:ON
/**
* No flags set.
*/

VK_RENDER_PASS_CREATE_FLAG_NONE(0x0);

private final int value;

VulkanRenderPassCreateFlag(final int i)
{
this.value = i;
}

@Override
public int value()
{
return 0;
return this.value;
}
}
Loading

0 comments on commit f332209

Please sign in to comment.