Testing in Rust

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 38

  • @letsgetrusty
    @letsgetrusty  3 роки тому +6

    📝 Get your *FREE Rust cheat sheet* : www.letsgetrusty.com/cheatsheet

    • @exoticcoder5365
      @exoticcoder5365 3 роки тому +1

      Signed up ! Good work !

    • @sparky173j
      @sparky173j 2 роки тому

      I learned about a few new things by reading this cheat sheet. Thanks for putting it together and sharing it

  • @jonasschade
    @jonasschade 3 роки тому +15

    Thanks a lot for your videos! :D
    You are doing a particularly good job explaining everything well enough without going into unnecessary details.
    As someone who already knows a couple of different programming languages, your videos really helped me to understand the things which differ in Rust.
    The quality of your videos is good, and they are well enough structured to easily skip chapters / parts which are already familiar.

  • @1234fewgfwe
    @1234fewgfwe 5 місяців тому +3

    reading the Rust Book can be boring and sometimes confusing. But seeing this guy making examples makes learning Rust so easy :D

  • @_ender
    @_ender 3 роки тому +9

    Thank you. I really appreciate these videos. Rust is awesome and i am glad that you are helping explain the rust book.

  • @meka4996
    @meka4996 3 роки тому +4

    Your videos are so good that they actually make me want to learn Rust!

  • @kitgary
    @kitgary 3 роки тому +2

    This is the best Rust series on UA-cam! You deserve more views and subscriptions! Good job!

  • @inx1819
    @inx1819 3 роки тому +7

    I'm surprised you don't get more views and subscribers. I subbed, I hope you blow up one day!

    • @camilo1u2b
      @camilo1u2b 2 роки тому

      not many people learning rust for now I guess

  • @HenriqueAraujo174
    @HenriqueAraujo174 2 роки тому +1

    You make Rust looks easy, thanks for your videos

  • @Gruby7C1h
    @Gruby7C1h 2 роки тому +3

    One thing that might bite you: expect works as contains instead of equal! So panic!("not too much"); matches: #[should_panic(expected = "too much")]

    • @d3stinYwOw
      @d3stinYwOw 2 місяці тому

      Thanks, because I was wondering if there's something like 'contains' parameter instead of equals

  • @GolangDojo
    @GolangDojo 3 роки тому +2

    Love that into boi

  • @pedrobmorales
    @pedrobmorales 2 роки тому +2

    Thank you! These videos are super informative and have helped me immensely in understanding Rust. Could you make a video covering mocking traits and structs? I've been trying to mock stuff like reqwest::Client or lapin::Connection but I have a hard time because these are in external crates. I've been writing code that takes references to the above, but I wonder if it's possible to create a &reqwest::Client which would be a mock object.

  • @exoticcoder5365
    @exoticcoder5365 3 роки тому +1

    Great Series !

  • @StellarWeb008
    @StellarWeb008 9 місяців тому

    Sir would you please consider making a video on "measuring" tests, that would be very helpful

  • @minastaros
    @minastaros Рік тому

    Thank you very much for these videos, it's a pleasure to learn that way! However, one objection concerning the test cases themselves: you should always check the boundary cases, since even the best borrow checker does not prevent you from one of the most often made error: off by one. What if your test checks that 200 is correctly filtered out, but does not discover that 100 may be filtered out as well (because else if in new() were >= by mistake)? Also, your test case checks -2 , but are you sure about 0? And is 1 in?

  • @andresmontoya7852
    @andresmontoya7852 3 роки тому +4

    Thanks! What are the extensions you use for vscode? For rust

  • @Nanagos
    @Nanagos 2 роки тому +2

    Now I just need something that will test my testing code 😅

  • @TopGearScooter
    @TopGearScooter 3 роки тому +1

    How did you get those inline parameters in your editor?

  • @eduardofernandezdiaz5264
    @eduardofernandezdiaz5264 2 роки тому

    How do you mock IO calls during testing

  • @sahilverma4077
    @sahilverma4077 3 роки тому +1

    can you please add a list of frameworks and resources to learn those frameworks in the cheatsheet

    • @letsgetrusty
      @letsgetrusty  3 роки тому +2

      Hmm not sure if it makes sense to add them to a cheatsheet but I'll consider it. I'm going to make a video about this as well.

    • @sahilverma4077
      @sahilverma4077 3 роки тому +1

      @@letsgetrusty oh, a video will be better, attach linkes to the resources in the description please

    • @fbarnea
      @fbarnea 20 днів тому

      ​@@sahilverma4077 can you really not find these links yourself?

  • @redemption5294
    @redemption5294 3 роки тому +1

    Can we develop full GUI desktop applications using rust?

    • @letsgetrusty
      @letsgetrusty  3 роки тому +3

      The infrastructure for creating GUI apps is still in the early stages of being built out. For more info check out www.areweguiyet.com/

    • @GAGONMYCOREY
      @GAGONMYCOREY 3 роки тому

      Also if you are making a bigboy app you can do rust-wasm + electron. This way it can look good and be powerful still 😎

    • @arya_bakh
      @arya_bakh 2 роки тому

      gtk supports rust bindings and it has a great guide

    • @abdullahmertozdemir9437
      @abdullahmertozdemir9437 Рік тому

      he actually made full stack rust video recently, in case you are not aware (a year later)

  • @real50cent
    @real50cent Рік тому

    Bogdan-goth-post-punker-version

  • @johnbaxter7582
    @johnbaxter7582 Рік тому

    has anyone ever told you that you look like dustycloud?

  • @RichardBurgess-v2h
    @RichardBurgess-v2h Рік тому +1

    First thing I was struck with: No Negation assert. One of the most useful activities in ANY programming language can be coding boolean functions to handle decisions on states that likely 1) occur more than once, 2) are potentially buggy because of the complexity of conditional constructs, 3) represent something that is easy to encapsulate and unittest, making them a very good candidate for doing so. Yet, and Rust isn't the only language I've run into this with, documentation on negation or even presence of negation assertions is missing or stupidly absent. Sure I can do assert!(!something), but that's about as bug prone as you can get. Come on you guys. No negate!(something) macro???? Really? I just spent another half hour looking after I looked a half hour last night when I was tired. If it is there, fine, but why not clearly in the docs??? If not, PLEASE!!!!

    • @gusslx
      @gusslx 9 місяців тому +1

      Why would assert!(!something) would be bug prone?