GithubHelp home page GithubHelp logo

Comments (4)

kpreid avatar kpreid commented on August 21, 2024

It makes sense to me that every wgpu type that has an ID should be comparable by that ID.

from wgpu.

cwfitzgerald avatar cwfitzgerald commented on August 21, 2024

Yeah global ids aren't going away any time soon, so I think it's reasonable to have these

from wgpu.

dfellis avatar dfellis commented on August 21, 2024

So I am a bit stumped on how to test this. I have implemented the traits for Buffer but as there's no constructor for the type, I'm at a bit of a loss as to how to write unit tests.

If you have any suggestions, let me know, then I'll look for other types that have an id and add the traits for those, as well.

from wgpu.

Wumpf avatar Wumpf commented on August 21, 2024

@dfellis have a look at the tests under wgpu/tests. They come with a test framework that makes it easier to create buffers from a device. A bit overkill on one hand but otherwise we'd need to start mocking things which gets complex (and we might just do that in that very framework if we ever figure that device creation etc. is too slow for tests that should only validate things like this)

from wgpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.